melib/imap: fix deflate feature flags
parent
f7ac1703e8
commit
96a3da3d7b
|
@ -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…
Reference in New Issue