melib/imap: fix deflate feature flags

pull/234/head
Manos Pitsidianakis 4 years ago
parent f7ac1703e8
commit 96a3da3d7b
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

@ -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."),
};

@ -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."),
};

Loading…
Cancel
Save