From e27b6fb51e20926c9e60111ecdbff23594ae90b8 Mon Sep 17 00:00:00 2001 From: Devin R Date: Fri, 17 Jul 2020 15:43:06 -0400 Subject: [PATCH] matrix-sdk-crypto: Fix map_clone clippy warning --- matrix_sdk_crypto/src/memory_stores.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix_sdk_crypto/src/memory_stores.rs b/matrix_sdk_crypto/src/memory_stores.rs index 51303864..67fe9245 100644 --- a/matrix_sdk_crypto/src/memory_stores.rs +++ b/matrix_sdk_crypto/src/memory_stores.rs @@ -199,6 +199,7 @@ impl DeviceStore { } /// Get a read-only view over all devices of the given user. + #[allow(clippy::map_clone)] pub fn user_devices(&self, user_id: &UserId) -> UserDevices { if !self.entries.contains_key(user_id) { self.entries.insert(user_id.clone(), DashMap::new()); @@ -207,7 +208,7 @@ impl DeviceStore { entries: self .entries .get(user_id) - .map(|d| d.clone()) // TODO I'm sure this is not ok but I'm not sure what to do?? + .map(|map| map.clone()) // TODO I'm sure this is not ok but I'm not sure what to do?? .unwrap() .into_read_only(), }