From 1e62fdf069db5687be510e1cc375260bbff318a7 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 27 Jan 2022 04:00:53 -0300 Subject: Introduce `Error::ContextCreationFailed` --- winit/src/error.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'winit') diff --git a/winit/src/error.rs b/winit/src/error.rs index 8e1d20e8..2dd045d2 100644 --- a/winit/src/error.rs +++ b/winit/src/error.rs @@ -11,17 +11,13 @@ pub enum Error { #[error("the application window could not be created")] WindowCreationFailed(winit::error::OsError), - /// 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 { fn from(error: iced_graphics::Error) -> Error { - match error { - iced_graphics::Error::AdapterNotFound => { - Error::GraphicsAdapterNotFound - } - } + Error::ContextCreationFailed(error) } } -- cgit