diff options
author | 2022-01-27 04:00:53 -0300 | |
---|---|---|
committer | 2022-04-20 19:57:59 -0300 | |
commit | 1e62fdf069db5687be510e1cc375260bbff318a7 (patch) | |
tree | b55e0db435c12bc31bda3bd7bcfe1908bcef32e0 /winit | |
parent | a33e320521fa0f08704bcea541ca337d0f45449e (diff) | |
download | iced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.gz iced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.bz2 iced-1e62fdf069db5687be510e1cc375260bbff318a7.zip |
Introduce `Error::ContextCreationFailed`
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/error.rs | 12 |
1 files changed, 4 insertions, 8 deletions
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<iced_graphics::Error> for Error { fn from(error: iced_graphics::Error) -> Error { - match error { - iced_graphics::Error::AdapterNotFound => { - Error::GraphicsAdapterNotFound - } - } + Error::ContextCreationFailed(error) } } |