mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
refactor: remove unused select_folder::Error variants
This commit is contained in:
@@ -10,12 +10,6 @@ type Result<T> = std::result::Result<T, Error>;
|
|||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum 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}")]
|
#[error("Got a NO response when trying to select {0}, usually this means that it doesn't exist: {1}")]
|
||||||
NoFolder(String, String),
|
NoFolder(String, String),
|
||||||
|
|
||||||
@@ -85,10 +79,6 @@ impl ImapSession {
|
|||||||
self.selected_mailbox = Some(mailbox);
|
self.selected_mailbox = Some(mailbox);
|
||||||
Ok(NewlySelected::Yes)
|
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(async_imap::error::Error::No(response)) => {
|
||||||
Err(Error::NoFolder(folder.to_string(), response))
|
Err(Error::NoFolder(folder.to_string(), response))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user