From 61926598ce96bee00aafe5340af4a905759b122a Mon Sep 17 00:00:00 2001 From: pml68 Date: Sat, 11 Jan 2025 01:50:16 +0100 Subject: refactor: remove iced_drop & workspace --- iced_builder/src/error.rs | 55 ----------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 iced_builder/src/error.rs (limited to 'iced_builder/src/error.rs') diff --git a/iced_builder/src/error.rs b/iced_builder/src/error.rs deleted file mode 100644 index f4011bd..0000000 --- a/iced_builder/src/error.rs +++ /dev/null @@ -1,55 +0,0 @@ -use std::io; -use std::sync::Arc; - -use thiserror::Error; - -#[derive(Debug, Clone, Error)] -#[error(transparent)] -pub enum Error { - IO(Arc), - #[error("config does not exist")] - ConfigMissing, - #[error("JSON parsing error: {0}")] - SerdeJSON(Arc), - #[error("TOML parsing error: {0}")] - SerdeTOML(#[from] toml::de::Error), - RustFmt(Arc), - #[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 for Error { - fn from(value: io::Error) -> Self { - Self::IO(Arc::new(value)) - } -} - -impl From for Error { - fn from(value: serde_json::Error) -> Self { - Self::SerdeJSON(Arc::new(value)) - } -} - -impl From for Error { - fn from(value: rust_format::Error) -> Self { - Self::RustFmt(Arc::new(value)) - } -} - -impl From<&str> for Error { - fn from(value: &str) -> Self { - Self::Other(value.to_owned()) - } -} - -impl From for Error { - fn from(value: String) -> Self { - Self::Other(value) - } -} -- cgit v1.2.3