From 7465574bdc253ccbc0cfb68b4a48e2839177cddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 11 Mar 2021 20:06:51 +0100 Subject: [PATCH] crypto: Fix a clippy warning --- matrix_sdk_crypto/src/store/sled.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/matrix_sdk_crypto/src/store/sled.rs b/matrix_sdk_crypto/src/store/sled.rs index 121b8843..b7f1282a 100644 --- a/matrix_sdk_crypto/src/store/sled.rs +++ b/matrix_sdk_crypto/src/store/sled.rs @@ -266,17 +266,14 @@ impl SledStore { .get_account_info() .ok_or(CryptoStoreError::AccountUnset)?; - let device_id: Arc = account_info.device_id.clone(); - let identity_keys = account_info.identity_keys.clone(); - self.outbound_group_sessions .get(room_id.encode())? .map(|p| serde_json::from_slice(&p).map_err(CryptoStoreError::Serialization)) .transpose()? .map(|p| { OutboundGroupSession::from_pickle( - device_id, - identity_keys, + account_info.device_id, + account_info.identity_keys, p, self.get_pickle_mode(), ) @@ -484,10 +481,6 @@ impl CryptoStore for SledStore { .get_account_info() .ok_or(CryptoStoreError::AccountUnset)?; - let user_id: Arc = account_info.user_id.clone(); - let device_id: Arc = account_info.device_id.clone(); - let identity_keys = account_info.identity_keys.clone(); - if self.session_cache.get(sender_key).is_none() { let sessions: Result> = self .sessions @@ -495,9 +488,9 @@ impl CryptoStore for SledStore { .map(|s| serde_json::from_slice(&s?.1).map_err(CryptoStoreError::Serialization)) .map(|p| { Session::from_pickle( - user_id.clone(), - device_id.clone(), - identity_keys.clone(), + account_info.user_id.clone(), + account_info.device_id.clone(), + account_info.identity_keys.clone(), p?, self.get_pickle_mode(), )