Skip to content

Commit

Permalink
Enable cloned_instead_of_copied clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Mar 12, 2023
1 parent a432303 commit 2bd7781
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
clippy::needless_borrow,
clippy::cast_lossless,
clippy::unused_async,
clippy::explicit_iter_loop
clippy::explicit_iter_loop,
clippy::cloned_instead_of_copied
)]
#![allow(
clippy::match_bool,
Expand Down
2 changes: 1 addition & 1 deletion src/receive_imf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ async fn add_parts(
// the mail is on the IMAP server, probably it is also delivered.
// We cannot recreate other states (read, error).
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 =
from_id == ContactId::SELF && to_ids.len() == 1 && to_ids.contains(&ContactId::SELF);
Expand Down

0 comments on commit 2bd7781

Please sign in to comment.