From db553b2040c4320ce7d8cded3c97ecb7506b1800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 11 Aug 2020 13:38:20 +0200 Subject: [PATCH] crypto: Fix some clippy warnings. --- matrix_sdk_crypto/src/machine.rs | 3 +-- matrix_sdk_crypto/src/memory_stores.rs | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index 340af00f..4b160c78 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -969,7 +969,7 @@ impl OlmMachine { panic!("Session is already shared"); } - // TODO don't mark the session as shared automatically only, when all + // TODO don't mark the session as shared automatically, only when all // the requests are done, failure to send these requests will likely end // up in wedged sessions. We'll need to store the requests and let the // caller mark them as sent using an UUID. @@ -986,7 +986,6 @@ impl OlmMachine { .await? .devices() { - // TODO abort if the device isn't verified devices.push(device.clone()); } } diff --git a/matrix_sdk_crypto/src/memory_stores.rs b/matrix_sdk_crypto/src/memory_stores.rs index c6828a78..7fb78b0e 100644 --- a/matrix_sdk_crypto/src/memory_stores.rs +++ b/matrix_sdk_crypto/src/memory_stores.rs @@ -62,6 +62,7 @@ impl SessionStore { /// Get all the sessions that belong to the given sender key. pub fn get(&self, sender_key: &str) -> Option>>> { + #[allow(clippy::map_clone)] self.entries.get(sender_key).map(|s| s.clone()) } @@ -75,6 +76,7 @@ impl SessionStore { #[derive(Debug, Default, Clone)] /// In-memory store that holds inbound group sessions. pub struct GroupSessionStore { + #[allow(clippy::type_complexity)] entries: Arc>>>, }