From 81c70b0136f5a94fe51593162f02f176400f596c Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Wed, 11 Dec 2019 16:07:08 +0200 Subject: [PATCH] melib: small test cosmetic fixes --- melib/src/backends.rs | 6 +++--- melib/src/backends/notmuch/bindings.rs | 10 ++++++++++ melib/src/email/address.rs | 3 ++- melib/src/email/compose.rs | 1 - 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/melib/src/backends.rs b/melib/src/backends.rs index aa433c70..656cc465 100644 --- a/melib/src/backends.rs +++ b/melib/src/backends.rs @@ -265,15 +265,15 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync { /// from (eg local or imap). /// /// # Creation -/// ```no_run +/// ```ignore /// /* Create operation from Backend */ /// /// let op = backend.operation(message.hash(), mailbox.folder.hash()); /// ``` /// /// # Example -/// ``` -/// use melib::mailbox::backends::{BackendOp}; +/// ```ignore +/// use melib::backends::{BackendOp}; /// use melib::Result; /// use melib::{Envelope, Flag}; /// diff --git a/melib/src/backends/notmuch/bindings.rs b/melib/src/backends/notmuch/bindings.rs index 405e7470..a90edb0f 100644 --- a/melib/src/backends/notmuch/bindings.rs +++ b/melib/src/backends/notmuch/bindings.rs @@ -1359,6 +1359,7 @@ extern "C" { #[doc = ""] #[doc = " Typical usage might be:"] #[doc = ""] + #[doc = "```text"] #[doc = " notmuch_query_t *query;"] #[doc = " notmuch_threads_t *threads;"] #[doc = " notmuch_thread_t *thread;"] @@ -1377,6 +1378,7 @@ extern "C" { #[doc = " }"] #[doc = ""] #[doc = " notmuch_query_destroy (query);"] + #[doc = "```"] #[doc = ""] #[doc = " Note: If you are finished with a thread before its containing"] #[doc = " query, you can call notmuch_thread_destroy to clean up some memory"] @@ -1415,6 +1417,7 @@ extern "C" { #[doc = ""] #[doc = " Typical usage might be:"] #[doc = ""] + #[doc = "```text"] #[doc = " notmuch_query_t *query;"] #[doc = " notmuch_messages_t *messages;"] #[doc = " notmuch_message_t *message;"] @@ -1431,6 +1434,7 @@ extern "C" { #[doc = " }"] #[doc = ""] #[doc = " notmuch_query_destroy (query);"] + #[doc = "```"] #[doc = ""] #[doc = " Note: If you are finished with a message before its containing"] #[doc = " query, you can call notmuch_message_destroy to clean up some memory"] @@ -1704,6 +1708,7 @@ extern "C" { #[doc = ""] #[doc = " Typical usage might be:"] #[doc = ""] + #[doc = "```text"] #[doc = " notmuch_thread_t *thread;"] #[doc = " notmuch_tags_t *tags;"] #[doc = " const char *tag;"] @@ -1719,6 +1724,7 @@ extern "C" { #[doc = " }"] #[doc = ""] #[doc = " notmuch_thread_destroy (thread);"] + #[doc = "```"] #[doc = ""] #[doc = " Note that there's no explicit destructor needed for the"] #[doc = " notmuch_tags_t object. (For consistency, we do provide a"] @@ -1958,6 +1964,7 @@ extern "C" { #[doc = ""] #[doc = " Typical usage might be:"] #[doc = ""] + #[doc = "```text"] #[doc = " notmuch_message_t *message;"] #[doc = " notmuch_tags_t *tags;"] #[doc = " const char *tag;"] @@ -1973,6 +1980,7 @@ extern "C" { #[doc = " }"] #[doc = ""] #[doc = " notmuch_message_destroy (message);"] + #[doc = "```"] #[doc = ""] #[doc = " Note that there's no explicit destructor needed for the"] #[doc = " notmuch_tags_t object. (For consistency, we do provide a"] @@ -2298,6 +2306,7 @@ extern "C" { #[doc = ""] #[doc = " Typical usage might be:"] #[doc = ""] + #[doc = "```text"] #[doc = " notmuch_message_properties_t *list;"] #[doc = ""] #[doc = " for (list = notmuch_message_get_properties (message, \"testkey1\", TRUE);"] @@ -2306,6 +2315,7 @@ extern "C" { #[doc = " }"] #[doc = ""] #[doc = " notmuch_message_properties_destroy (list);"] + #[doc = "```"] #[doc = ""] #[doc = " Note that there's no explicit destructor needed for the"] #[doc = " notmuch_message_properties_t object. (For consistency, we do"] diff --git a/melib/src/email/address.rs b/melib/src/email/address.rs index bdf9a96f..85231418 100644 --- a/melib/src/email/address.rs +++ b/melib/src/email/address.rs @@ -32,6 +32,7 @@ pub struct GroupAddress { /** * Container for an address. * + * ```text * > raw: Vec * > ┌──────────┴────────────┐ * > Name @@ -48,7 +49,7 @@ pub struct GroupAddress { * > display_name │ * > │ * > address_spec - * + *``` */ pub struct MailboxAddress { pub raw: Vec, diff --git a/melib/src/email/compose.rs b/melib/src/email/compose.rs index bb67a6df..594ae1ba 100644 --- a/melib/src/email/compose.rs +++ b/melib/src/email/compose.rs @@ -398,7 +398,6 @@ fn print_attachment(ret: &mut String, kind: &MultipartType, a: AttachmentBuilder #[cfg(test)] mod tests { use super::*; - use std::io::Read; use std::str::FromStr; #[test]