From 1e62fdf069db5687be510e1cc375260bbff318a7 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 27 Jan 2022 04:00:53 -0300 Subject: Introduce `Error::ContextCreationFailed` --- src/error.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 17479c60..83c9b1b6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -11,9 +11,9 @@ pub enum Error { #[error("the application window could not be created")] WindowCreationFailed(Box), - /// A suitable graphics adapter or device could not be found. - #[error("a suitable graphics adapter or device could not be found")] - GraphicsAdapterNotFound, + /// The application context could not be created. + #[error("the application context could not be created")] + ContextCreationFailed(iced_graphics::Error), } impl From for Error { @@ -25,8 +25,8 @@ impl From for Error { iced_winit::Error::WindowCreationFailed(error) => { Error::WindowCreationFailed(Box::new(error)) } - iced_winit::Error::GraphicsAdapterNotFound => { - Error::GraphicsAdapterNotFound + iced_winit::Error::ContextCreationFailed(error) => { + Error::ContextCreationFailed(error) } } } -- cgit From 18ecec2bbd9478151b8c65df0644278a174d0847 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 26 Apr 2022 19:28:04 -0300 Subject: Change `ContextCreationFailed` to `GraphicsCreationFailed` --- src/error.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 83c9b1b6..0bfa3ff1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -11,9 +11,9 @@ pub enum Error { #[error("the application window could not be created")] WindowCreationFailed(Box), - /// The application context could not be created. - #[error("the application context could not be created")] - ContextCreationFailed(iced_graphics::Error), + /// The application graphics context could not be created. + #[error("the application graphics context could not be created")] + GraphicsCreationFailed(iced_graphics::Error), } impl From for Error { @@ -25,8 +25,8 @@ impl From for Error { iced_winit::Error::WindowCreationFailed(error) => { Error::WindowCreationFailed(Box::new(error)) } - iced_winit::Error::ContextCreationFailed(error) => { - Error::ContextCreationFailed(error) + iced_winit::Error::GraphicsCreationFailed(error) => { + Error::GraphicsCreationFailed(error) } } } -- cgit