From ea8adf39c2fe80920478485ffd493fe31342619b Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 1 Dec 2019 12:03:18 +0100 Subject: [PATCH] address @link2xt comment --- src/error.rs | 3 --- src/imap.rs | 2 +- src/job_thread.rs | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/error.rs b/src/error.rs index 631f2eebe..45f8130f7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -36,9 +36,6 @@ pub enum Error { InvalidMsgId, #[fail(display = "Watch folder not found {:?}", _0)] WatchFolderNotFound(String), - - #[fail(display = "error {:?}", _0)] - Other(String), } pub type Result = std::result::Result; diff --git a/src/imap.rs b/src/imap.rs index b0531cad9..a0295b419 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -97,7 +97,7 @@ impl From for Error { impl From for crate::error::Error { fn from(err: Error) -> crate::error::Error { - crate::error::Error::Other(err.to_string()) + crate::error::Error::Message(err.to_string()) } } diff --git a/src/job_thread.rs b/src/job_thread.rs index c17ae9a4a..427e6a077 100644 --- a/src/job_thread.rs +++ b/src/job_thread.rs @@ -113,7 +113,7 @@ impl JobThread { Err(Error::WatchFolderNotFound("not-set".to_string())) } } - Err(err) => Err(crate::error::Error::Other(err.to_string())), + Err(err) => Err(crate::error::Error::Message(err.to_string())), } }