diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-08-25 21:34:22 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-08-26 00:54:07 +0300 |
commit | 96a3da3d7bd03304c195e8be303759c8dad360ff (patch) | |
tree | c433aecc73d2d99962ee8ecedc29bd8ac8279cf8 | |
parent | f7ac1703e8bf57aa46700438b4c92c37f297e602 (diff) |
melib/imap: fix deflate feature flags
-rw-r--r-- | melib/src/backends/imap.rs | 7 | ||||
-rw-r--r-- | melib/src/backends/nntp.rs | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/melib/src/backends/imap.rs b/melib/src/backends/imap.rs index 154d37e5..55c26165 100644 --- a/melib/src/backends/imap.rs +++ b/melib/src/backends/imap.rs @@ -242,7 +242,8 @@ impl MailBackend for ImapType { } } "COMPRESS=DEFLATE" => { - if cfg!(feature = "deflate_compression") { + #[cfg(feature = "deflate_compression")] + { if deflate { *status = MailBackendExtensionStatus::Enabled { comment: None }; } else { @@ -250,7 +251,9 @@ impl MailBackend for ImapType { comment: Some("Disabled by user configuration"), }; } - } else { + } + #[cfg(not(feature = "deflate_compression"))] + { *status = MailBackendExtensionStatus::Unsupported { comment: Some("melib not compiled with DEFLATE."), }; diff --git a/melib/src/backends/nntp.rs b/melib/src/backends/nntp.rs index 9a00798f..eff3fb1d 100644 --- a/melib/src/backends/nntp.rs +++ b/melib/src/backends/nntp.rs @@ -151,7 +151,8 @@ impl MailBackend for NntpType { for (name, status) in extensions.iter_mut() { match name.as_str() { "COMPRESS DEFLATE" => { - if cfg!(feature = "deflate_compression") { + #[cfg(feature = "deflate_compression")] + { if deflate { *status = MailBackendExtensionStatus::Enabled { comment: None }; } else { @@ -159,7 +160,9 @@ impl MailBackend for NntpType { comment: Some("Disabled by user configuration"), }; } - } else { + } + #[cfg(not(feature = "deflate_compression"))] + { *status = MailBackendExtensionStatus::Unsupported { comment: Some("melib not compiled with DEFLATE."), }; |