diff --git a/meli/Cargo.toml b/meli/Cargo.toml index 8e35e9cf..1512267d 100644 --- a/meli/Cargo.toml +++ b/meli/Cargo.toml @@ -25,7 +25,7 @@ path = "src/lib.rs" [[bin]] name = "managesieve-client" path = "src/managesieve.rs" -required-features = ["melib/imap_backend"] +required-features = ["melib/imap"] [dependencies] async-task = "^4.2.0" diff --git a/melib/Cargo.toml b/melib/Cargo.toml index cb83e945..386fdc4c 100644 --- a/melib/Cargo.toml +++ b/melib/Cargo.toml @@ -70,14 +70,14 @@ mailin-embedded = { version = "0.7", features = ["rtls"] } stderrlog = "^0.5" [features] -default = ["unicode_algorithms", "imap_backend", "maildir_backend", "mbox_backend", "vcard", "smtp", "deflate_compression"] +default = ["unicode_algorithms", "imap", "maildir_backend", "mbox_backend", "vcard", "smtp", "deflate_compression"] debug-tracing = [] deflate_compression = ["flate2", "imap-codec/ext_compress"] gpgme = [] http = ["isahc"] http-static = ["isahc", "isahc/static-curl"] -imap_backend = ["imap-codec", "tls"] +imap = ["imap-codec", "tls"] jmap_backend = ["http"] maildir_backend = ["notify"] mbox_backend = ["notify"] diff --git a/melib/README.md b/melib/README.md index eb3d3813..514209bb 100644 --- a/melib/README.md +++ b/melib/README.md @@ -8,7 +8,7 @@ Library for handling mail. | feature flag | dependencies | notes | | ---------------------- | ----------------------------------- | ------------------------ | -| `imap_backend` | `native-tls` | | +| `imap` | `native-tls` | | | `deflate_compression` | `flate2` | for use with IMAP | | `jmap_backend` | `isahc`, `native-tls`, `serde_json` | | | `maildir_backend` | `notify` | | diff --git a/melib/src/backends.rs b/melib/src/backends.rs index f5b53f63..db8c09fd 100644 --- a/melib/src/backends.rs +++ b/melib/src/backends.rs @@ -22,9 +22,9 @@ pub mod utf7; use smallvec::SmallVec; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] pub mod imap; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] pub mod nntp; #[cfg(feature = "notmuch_backend")] pub mod notmuch; @@ -50,13 +50,13 @@ use std::{ use futures::stream::Stream; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] pub use self::imap::ImapType; #[cfg(feature = "maildir_backend")] use self::maildir::MaildirType; #[cfg(feature = "mbox_backend")] use self::mbox::MboxType; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] pub use self::nntp::NntpType; use super::email::{Envelope, EnvelopeHash, Flag}; use crate::{ @@ -174,7 +174,7 @@ impl Backends { }, ); } - #[cfg(feature = "imap_backend")] + #[cfg(feature = "imap")] { b.register( "imap".to_string(), diff --git a/melib/src/email.rs b/melib/src/email.rs index c1d347f0..a0e2d855 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -110,7 +110,7 @@ pub use address::{Address, MessageID, References, StrBuild, StrBuilder}; pub use attachments::{Attachment, AttachmentBuilder}; pub use compose::{attachment_from_file, Draft}; pub use headers::*; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] use imap_codec::{ core::{AString, Atom, NonEmptyVec}, fetch::{MacroOrMessageDataItemNames, MessageDataItemName}, @@ -126,7 +126,7 @@ use crate::{ TagHash, UnixTimestamp, }; -#[cfg(feature = "imap_backend")] +#[cfg(feature = "imap")] // [ref:TODO]: (#222) Make this `const` as soon as it is possible. pub(crate) fn common_attributes() -> MacroOrMessageDataItemNames<'static> { MacroOrMessageDataItemNames::MessageDataItemNames(vec![ @@ -187,7 +187,7 @@ impl Flag { flag_impl!(fn is_draft, Self::DRAFT); flag_impl!(fn is_flagged, Self::FLAGGED); - #[cfg(feature = "imap_backend")] + #[cfg(feature = "imap")] pub(crate) fn derive_imap_codec_flags(&self) -> Vec { let mut flags = Vec::new(); diff --git a/tools/Cargo.toml b/tools/Cargo.toml index d77b1782..250e3c41 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -25,7 +25,7 @@ path = "src/mboxparse.rs" [[bin]] name = "imapshell" path = "src/imapshell.rs" -required-features = ["melib/imap_backend"] +required-features = ["melib/imap"] [[bin]] name = "smtp_conn"