From 64cd48a4e14e9d30553a7979357057454d594d65 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 17 Oct 2020 15:24:09 +0300 Subject: [PATCH] Fix nightly clippy warnings --- src/dc_tools.rs | 5 +---- src/e2ee.rs | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/dc_tools.rs b/src/dc_tools.rs index a1bcc23bb..e88fe3218 100644 --- a/src/dc_tools.rs +++ b/src/dc_tools.rs @@ -717,10 +717,7 @@ where T: AsRef, { fn is_none_or_empty(&self) -> bool { - match self { - Some(s) if !s.as_ref().is_empty() => false, - _ => true, - } + !matches!(self, Some(s) if !s.as_ref().is_empty()) } } diff --git a/src/e2ee.rs b/src/e2ee.rs index 63c3aaca5..f01a803d2 100644 --- a/src/e2ee.rs +++ b/src/e2ee.rs @@ -235,9 +235,9 @@ fn get_autocrypt_mime<'a, 'b>(mail: &'a ParsedMail<'b>) -> Result<&'a ParsedMail } } -async fn decrypt_if_autocrypt_message<'a>( +async fn decrypt_if_autocrypt_message( context: &Context, - mail: &ParsedMail<'a>, + mail: &ParsedMail<'_>, private_keyring: Keyring, public_keyring_for_validate: Keyring, ret_valid_signatures: &mut HashSet,