Enable cloned_instead_of_copied clippy lint

This commit is contained in:
link2xt
2023-03-12 14:45:46 +00:00
parent a432303576
commit 2bd7781276
2 changed files with 3 additions and 2 deletions

View File

@@ -13,7 +13,8 @@
clippy::needless_borrow, clippy::needless_borrow,
clippy::cast_lossless, clippy::cast_lossless,
clippy::unused_async, clippy::unused_async,
clippy::explicit_iter_loop clippy::explicit_iter_loop,
clippy::cloned_instead_of_copied
)] )]
#![allow( #![allow(
clippy::match_bool, clippy::match_bool,

View File

@@ -737,7 +737,7 @@ async fn add_parts(
// the mail is on the IMAP server, probably it is also delivered. // the mail is on the IMAP server, probably it is also delivered.
// We cannot recreate other states (read, error). // We cannot recreate other states (read, error).
state = MessageState::OutDelivered; state = MessageState::OutDelivered;
to_id = to_ids.get(0).cloned().unwrap_or_default(); to_id = to_ids.get(0).copied().unwrap_or_default();
let self_sent = let self_sent =
from_id == ContactId::SELF && to_ids.len() == 1 && to_ids.contains(&ContactId::SELF); from_id == ContactId::SELF && to_ids.len() == 1 && to_ids.contains(&ContactId::SELF);