From c4e4e28f660674f6d071719386616ed251641fc3 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Tue, 7 Oct 2025 15:51:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(error):=20refine=20error=20h?= =?UTF-8?q?andling=20with=20granular=20variants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - introduce specific error variants for std::io::Error and toml::de::Error - remove commented-out error variants to streamline error reporting --- src/error.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/error.rs b/src/error.rs index 1888c10..b964ac4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -16,13 +16,12 @@ pub enum Error { #[error("Directory creation failed for `{0:?}`")] DirectoryCreationFailed((String, Box)), /// Error from the google_gmail1 crate - // #[error("Google Gmail1 says: {0}")] #[error(transparent)] GoogleGmail1(#[from] Box), - // /// Error from the google_clis_common crate - // #[error("Google CLIs Common says: {0}")] - // InvalidOptionsError(google_clis_common::CLIError, i16), - // /// Other error - // #[error("Error reported: {0}")] - // Other(#[from] String), + /// Error from std::io + #[error(transparent)] + StdIO(#[from] std::io::Error), + /// Error from toml_de + #[error(transparent)] + TomlDe(#[from] toml::de::Error), }