melib/imap: fix deflate feature flags
parent
f7ac1703e8
commit
96a3da3d7b
|
@ -242,7 +242,8 @@ impl MailBackend for ImapType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"COMPRESS=DEFLATE" => {
|
"COMPRESS=DEFLATE" => {
|
||||||
if cfg!(feature = "deflate_compression") {
|
#[cfg(feature = "deflate_compression")]
|
||||||
|
{
|
||||||
if deflate {
|
if deflate {
|
||||||
*status = MailBackendExtensionStatus::Enabled { comment: None };
|
*status = MailBackendExtensionStatus::Enabled { comment: None };
|
||||||
} else {
|
} else {
|
||||||
|
@ -250,7 +251,9 @@ impl MailBackend for ImapType {
|
||||||
comment: Some("Disabled by user configuration"),
|
comment: Some("Disabled by user configuration"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
#[cfg(not(feature = "deflate_compression"))]
|
||||||
|
{
|
||||||
*status = MailBackendExtensionStatus::Unsupported {
|
*status = MailBackendExtensionStatus::Unsupported {
|
||||||
comment: Some("melib not compiled with DEFLATE."),
|
comment: Some("melib not compiled with DEFLATE."),
|
||||||
};
|
};
|
||||||
|
|
|
@ -151,7 +151,8 @@ impl MailBackend for NntpType {
|
||||||
for (name, status) in extensions.iter_mut() {
|
for (name, status) in extensions.iter_mut() {
|
||||||
match name.as_str() {
|
match name.as_str() {
|
||||||
"COMPRESS DEFLATE" => {
|
"COMPRESS DEFLATE" => {
|
||||||
if cfg!(feature = "deflate_compression") {
|
#[cfg(feature = "deflate_compression")]
|
||||||
|
{
|
||||||
if deflate {
|
if deflate {
|
||||||
*status = MailBackendExtensionStatus::Enabled { comment: None };
|
*status = MailBackendExtensionStatus::Enabled { comment: None };
|
||||||
} else {
|
} else {
|
||||||
|
@ -159,7 +160,9 @@ impl MailBackend for NntpType {
|
||||||
comment: Some("Disabled by user configuration"),
|
comment: Some("Disabled by user configuration"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
#[cfg(not(feature = "deflate_compression"))]
|
||||||
|
{
|
||||||
*status = MailBackendExtensionStatus::Unsupported {
|
*status = MailBackendExtensionStatus::Unsupported {
|
||||||
comment: Some("melib not compiled with DEFLATE."),
|
comment: Some("melib not compiled with DEFLATE."),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue