summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
commit3a0d34c0240f4421737a6a08761f99d6f8140d02 (patch)
treec9a4a6b8e9c1db1b8fcd05bc98e3f131d5ef4bd5 /src/error.rs
parentc54409d1711e1f615c7ea4b02c082954e340632a (diff)
downloadiced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.gz
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.bz2
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.zip
Create `iced_widget` subcrate and re-organize the whole codebase
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/error.rs b/src/error.rs
index 5326718f..111bedf2 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,4 +1,6 @@
-use iced_futures::futures;
+use crate::futures;
+use crate::graphics;
+use crate::shell;
/// An error that occurred while running an application.
#[derive(Debug, thiserror::Error)]
@@ -13,19 +15,19 @@ pub enum Error {
/// The application graphics context could not be created.
#[error("the application graphics context could not be created")]
- GraphicsCreationFailed(iced_renderer::Error),
+ GraphicsCreationFailed(graphics::Error),
}
-impl From<iced_winit::Error> for Error {
- fn from(error: iced_winit::Error) -> Error {
+impl From<shell::Error> for Error {
+ fn from(error: shell::Error) -> Error {
match error {
- iced_winit::Error::ExecutorCreationFailed(error) => {
+ shell::Error::ExecutorCreationFailed(error) => {
Error::ExecutorCreationFailed(error)
}
- iced_winit::Error::WindowCreationFailed(error) => {
+ shell::Error::WindowCreationFailed(error) => {
Error::WindowCreationFailed(Box::new(error))
}
- iced_winit::Error::GraphicsCreationFailed(error) => {
+ shell::Error::GraphicsCreationFailed(error) => {
Error::GraphicsCreationFailed(error)
}
}