From 2bd7781276ed98ed7050364843177bf82d7b1246 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 12 Mar 2023 14:45:46 +0000 Subject: [PATCH] Enable cloned_instead_of_copied clippy lint --- src/lib.rs | 3 ++- src/receive_imf.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 976d122b4..b15f5dcf7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, diff --git a/src/receive_imf.rs b/src/receive_imf.rs index f52f0838a..9a8504d43 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -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);