diff --git a/src/imap/select_folder.rs b/src/imap/select_folder.rs index b51196a8e..baaae3d0b 100644 --- a/src/imap/select_folder.rs +++ b/src/imap/select_folder.rs @@ -10,12 +10,6 @@ type Result = std::result::Result; #[derive(Debug, thiserror::Error)] pub enum Error { - #[error("IMAP Connection Lost or no connection established")] - ConnectionLost, - - #[error("IMAP Folder name invalid: {0}")] - BadFolderName(String), - #[error("Got a NO response when trying to select {0}, usually this means that it doesn't exist: {1}")] NoFolder(String, String), @@ -85,10 +79,6 @@ impl ImapSession { self.selected_mailbox = Some(mailbox); Ok(NewlySelected::Yes) } - Err(async_imap::error::Error::ConnectionLost) => Err(Error::ConnectionLost), - Err(async_imap::error::Error::Validate(_)) => { - Err(Error::BadFolderName(folder.to_string())) - } Err(async_imap::error::Error::No(response)) => { Err(Error::NoFolder(folder.to_string(), response)) }