mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
refactor: enable clippy::manual_is_variant_and
This commit is contained in:
@@ -591,8 +591,7 @@ impl Context {
|
|||||||
.get_config(key)
|
.get_config(key)
|
||||||
.await?
|
.await?
|
||||||
.and_then(|s| s.parse::<i32>().ok())
|
.and_then(|s| s.parse::<i32>().ok())
|
||||||
.map(|x| x != 0)
|
.is_some_and(|x| x != 0))
|
||||||
.unwrap_or_default())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if movebox ("DeltaChat" folder) should be watched.
|
/// Returns true if movebox ("DeltaChat" folder) should be watched.
|
||||||
|
|||||||
@@ -2152,11 +2152,10 @@ pub(crate) async fn prefetch_should_download(
|
|||||||
let accepted_contact = origin.is_known();
|
let accepted_contact = origin.is_known();
|
||||||
let is_reply_to_chat_message = get_prefetch_parent_message(context, headers)
|
let is_reply_to_chat_message = get_prefetch_parent_message(context, headers)
|
||||||
.await?
|
.await?
|
||||||
.map(|parent| match parent.is_dc_message {
|
.is_some_and(|parent| match parent.is_dc_message {
|
||||||
MessengerMessage::No => false,
|
MessengerMessage::No => false,
|
||||||
MessengerMessage::Yes | MessengerMessage::Reply => true,
|
MessengerMessage::Yes | MessengerMessage::Reply => true,
|
||||||
})
|
});
|
||||||
.unwrap_or_default();
|
|
||||||
|
|
||||||
let show_emails =
|
let show_emails =
|
||||||
ShowEmails::from_i32(context.get_config_int(Config::ShowEmails).await?).unwrap_or_default();
|
ShowEmails::from_i32(context.get_config_int(Config::ShowEmails).await?).unwrap_or_default();
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
clippy::unused_async,
|
clippy::unused_async,
|
||||||
clippy::explicit_iter_loop,
|
clippy::explicit_iter_loop,
|
||||||
clippy::explicit_into_iter_loop,
|
clippy::explicit_into_iter_loop,
|
||||||
clippy::cloned_instead_of_copied
|
clippy::cloned_instead_of_copied,
|
||||||
|
clippy::manual_is_variant_and
|
||||||
)]
|
)]
|
||||||
#![cfg_attr(not(test), forbid(clippy::indexing_slicing))]
|
#![cfg_attr(not(test), forbid(clippy::indexing_slicing))]
|
||||||
#![cfg_attr(not(test), forbid(clippy::string_slice))]
|
#![cfg_attr(not(test), forbid(clippy::string_slice))]
|
||||||
|
|||||||
Reference in New Issue
Block a user