summaryrefslogtreecommitdiff
path: root/iced_builder/src/error.rs
diff options
context:
space:
mode:
authorPolesznyák Márk László <116908301+pml68@users.noreply.github.com>2025-01-11 23:13:07 +0100
committerGitHub <noreply@github.com>2025-01-11 23:13:07 +0100
commit103699beeb8bdce38bc5803cbe038e74cbc20e40 (patch)
treeb79e13b3decc778cc7c66af7187c647ae0a21a52 /iced_builder/src/error.rs
parentMerge pull request #4 from pml68/feat/playground (diff)
parentrefactor: remove iced_drop & workspace (diff)
downloadiced-builder-103699beeb8bdce38bc5803cbe038e74cbc20e40.tar.gz
Merge pull request #5 from pml68/feat/config
Config done
Diffstat (limited to 'iced_builder/src/error.rs')
-rw-r--r--iced_builder/src/error.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/iced_builder/src/error.rs b/iced_builder/src/error.rs
deleted file mode 100644
index 8876016..0000000
--- a/iced_builder/src/error.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-use std::io;
-use std::sync::Arc;
-
-use thiserror::Error;
-
-#[derive(Debug, Clone, Error)]
-#[error(transparent)]
-pub enum Error {
- IOError(Arc<io::Error>),
- SerdeError(Arc<serde_json::Error>),
- FormatError(Arc<rust_format::Error>),
- #[error("The element tree contains no matching element")]
- NonExistentElement,
- #[error(
- "The file dialog has been closed without selecting a valid option"
- )]
- DialogClosed,
- #[error("{0}")]
- Other(String),
-}
-
-impl From<io::Error> for Error {
- fn from(value: io::Error) -> Self {
- Self::IOError(Arc::new(value))
- }
-}
-
-impl From<serde_json::Error> for Error {
- fn from(value: serde_json::Error) -> Self {
- Self::SerdeError(Arc::new(value))
- }
-}
-
-impl From<rust_format::Error> for Error {
- fn from(value: rust_format::Error) -> Self {
- Self::FormatError(Arc::new(value))
- }
-}
-
-impl From<&str> for Error {
- fn from(value: &str) -> Self {
- Self::Other(value.to_owned())
- }
-}