diff options
| author | pml68 <contact@pml68.dev> | 2025-06-16 00:27:57 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-06-16 00:27:57 +0200 |
| commit | eff665a59aa5ce1efc59e567dadc91fef1ec0366 (patch) | |
| tree | c29611429add80b9eb13e21818fe3c10d871711e /src/error.rs | |
| parent | style: `ḋialogs` -> `dialog` (diff) | |
| download | iced-builder-eff665a59aa5ce1efc59e567dadc91fef1ec0366.tar.gz | |
feat: automatically save config updates
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/error.rs b/src/error.rs index 8c405b3..b98d678 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,13 +7,15 @@ use thiserror::Error; #[derive(Debug, Clone, Error)] #[error(transparent)] pub enum Error { - IO(Arc<io::Error>), + Io(Arc<io::Error>), #[error("Config file does not exist, so a default one was created")] ConfigMissing, #[error("JSON parsing error: {0}")] - SerdeJSON(Arc<serde_json::Error>), + Json(Arc<serde_json::Error>), #[error("TOML parsing error: {0}")] - SerdeTOML(#[from] toml::de::Error), + TomlDe(#[from] toml::de::Error), + #[error("TOML serialization error: {0}")] + TomlSer(#[from] toml::ser::Error), RustFmt(Arc<rust_format::Error>), #[error("The element tree contains no matching element")] NonExistentElement, @@ -25,13 +27,13 @@ pub enum Error { impl From<io::Error> for Error { fn from(value: io::Error) -> Self { - Self::IO(Arc::new(value)) + Self::Io(Arc::new(value)) } } impl From<serde_json::Error> for Error { fn from(value: serde_json::Error) -> Self { - Self::SerdeJSON(Arc::new(value)) + Self::Json(Arc::new(value)) } } |
