diff --git a/melib/src/backends.rs b/melib/src/backends.rs index 6d0ce570d..b7a9a188b 100644 --- a/melib/src/backends.rs +++ b/melib/src/backends.rs @@ -425,9 +425,6 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync { /// struct FooOp {} /// /// impl BackendOp for FooOp { -/// fn description(&self) -> String { -/// "Foobar".to_string() -/// } /// fn as_bytes(&mut self) -> Result<&[u8]> { /// unimplemented!() /// } @@ -437,10 +434,8 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync { /// } /// /// let operation = Box::new(FooOp {}); -/// assert_eq!("Foobar", &operation.description()); /// ``` pub trait BackendOp: ::std::fmt::Debug + ::std::marker::Send { - fn description(&self) -> String; fn as_bytes(&mut self) -> Result<&[u8]>; fn fetch_flags(&self) -> Result; fn set_flag( @@ -471,9 +466,6 @@ impl ReadOnlyOp { } impl BackendOp for ReadOnlyOp { - fn description(&self) -> String { - format!("read-only: {}", self.op.description()) - } fn as_bytes(&mut self) -> Result<&[u8]> { self.op.as_bytes() } diff --git a/melib/src/backends/imap/operations.rs b/melib/src/backends/imap/operations.rs index f4c87f8ad..2ef4da7d8 100644 --- a/melib/src/backends/imap/operations.rs +++ b/melib/src/backends/imap/operations.rs @@ -64,10 +64,6 @@ impl ImapOp { } impl BackendOp for ImapOp { - fn description(&self) -> String { - format!("Message in mailbox: {}", &self.mailbox_path) - } - fn as_bytes(&mut self) -> Result<&[u8]> { if self.bytes.is_none() { let mut bytes_cache = self.uid_store.byte_cache.lock()?; diff --git a/melib/src/backends/imap_async/operations.rs b/melib/src/backends/imap_async/operations.rs index 4a8fd4a0a..df31a98b2 100644 --- a/melib/src/backends/imap_async/operations.rs +++ b/melib/src/backends/imap_async/operations.rs @@ -64,10 +64,6 @@ impl ImapOp { } impl BackendOp for ImapOp { - fn description(&self) -> String { - format!("Message in mailbox: {}", &self.mailbox_path) - } - fn as_bytes(&mut self) -> Result<&[u8]> { if self.bytes.is_none() { let mut bytes_cache = self.uid_store.byte_cache.lock()?; diff --git a/melib/src/backends/jmap/operations.rs b/melib/src/backends/jmap/operations.rs index 9fe378d6c..65ce72150 100644 --- a/melib/src/backends/jmap/operations.rs +++ b/melib/src/backends/jmap/operations.rs @@ -57,13 +57,6 @@ impl JmapOp { } impl BackendOp for JmapOp { - fn description(&self) -> String { - self.store - .try_read() - .and_then(|store_lck| Ok(store_lck.id_store[&self.hash].clone())) - .unwrap_or(String::new()) - } - fn as_bytes(&mut self) -> Result<&[u8]> { if self.bytes.is_none() { let mut store_lck = self.store.write().unwrap(); diff --git a/melib/src/backends/maildir.rs b/melib/src/backends/maildir.rs index e7d76104e..d7ec4dd90 100644 --- a/melib/src/backends/maildir.rs +++ b/melib/src/backends/maildir.rs @@ -90,9 +90,6 @@ impl MaildirOp { } impl<'a> BackendOp for MaildirOp { - fn description(&self) -> String { - format!("Path of file: {}", self.path().display()) - } fn as_bytes(&mut self) -> Result<&[u8]> { if self.slice.is_none() { self.slice = Some(Mmap::open_path(self.path(), Protection::Read)?); diff --git a/melib/src/backends/mbox.rs b/melib/src/backends/mbox.rs index 4239c0f51..75e44bc86 100644 --- a/melib/src/backends/mbox.rs +++ b/melib/src/backends/mbox.rs @@ -182,10 +182,6 @@ impl MboxOp { } impl BackendOp for MboxOp { - fn description(&self) -> String { - String::new() - } - fn as_bytes(&mut self) -> Result<&[u8]> { if self.slice.is_none() { self.slice = Some(Mmap::open_path(&self.path, Protection::Read)?); diff --git a/melib/src/backends/notmuch.rs b/melib/src/backends/notmuch.rs index fb755ec01..256f4664e 100644 --- a/melib/src/backends/notmuch.rs +++ b/melib/src/backends/notmuch.rs @@ -646,10 +646,6 @@ struct NotmuchOp { } impl BackendOp for NotmuchOp { - fn description(&self) -> String { - String::new() - } - fn as_bytes(&mut self) -> Result<&[u8]> { let mut message: *mut notmuch_message_t = std::ptr::null_mut(); let index_lck = self.index.write().unwrap(); diff --git a/src/plugins/backend.rs b/src/plugins/backend.rs index 0a58964a3..7af3cc8cc 100644 --- a/src/plugins/backend.rs +++ b/src/plugins/backend.rs @@ -297,10 +297,6 @@ struct PluginOp { } impl BackendOp for PluginOp { - fn description(&self) -> String { - String::new() - } - fn as_bytes(&mut self) -> Result<&[u8]> { if let Some(ref bytes) = self.bytes { return Ok(bytes.as_bytes());