diff options
author | 2022-01-27 04:00:53 -0300 | |
---|---|---|
committer | 2022-04-20 19:57:59 -0300 | |
commit | 1e62fdf069db5687be510e1cc375260bbff318a7 (patch) | |
tree | b55e0db435c12bc31bda3bd7bcfe1908bcef32e0 /src | |
parent | a33e320521fa0f08704bcea541ca337d0f45449e (diff) | |
download | iced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.gz iced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.bz2 iced-1e62fdf069db5687be510e1cc375260bbff318a7.zip |
Introduce `Error::ContextCreationFailed`
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<dyn std::error::Error + Send + Sync>), - /// 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_winit::Error> for Error { @@ -25,8 +25,8 @@ impl From<iced_winit::Error> 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) } } } |