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` --- glutin/src/application.rs | 6 +++--- src/error.rs | 10 +++++----- winit/src/error.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/glutin/src/application.rs b/glutin/src/application.rs index 1400dcce..61f3ecd5 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -94,16 +94,16 @@ where Error::WindowCreationFailed(error) } CreationError::OpenGlVersionNotSupported => { - Error::ContextCreationFailed( + Error::GraphicsCreationFailed( ContextError::VersionNotSupported, ) } CreationError::NoAvailablePixelFormat => { - Error::ContextCreationFailed( + Error::GraphicsCreationFailed( ContextError::NoAvailablePixelFormat, ) } - error => Error::ContextCreationFailed( + error => Error::GraphicsCreationFailed( ContextError::BackendError(error.to_string()), ), } 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) } } } diff --git a/winit/src/error.rs b/winit/src/error.rs index 2dd045d2..eaeafd51 100644 --- a/winit/src/error.rs +++ b/winit/src/error.rs @@ -11,13 +11,13 @@ pub enum Error { #[error("the application window could not be created")] WindowCreationFailed(winit::error::OsError), - /// 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 { fn from(error: iced_graphics::Error) -> Error { - Error::ContextCreationFailed(error) + Error::GraphicsCreationFailed(error) } } -- cgit