From d1313b8614d29442852cff0344fe1910e7eb9572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 14 Oct 2020 16:15:26 +0200 Subject: [PATCH] crypto: Fix another clippy warning. --- matrix_sdk_crypto/src/olm/signing.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/matrix_sdk_crypto/src/olm/signing.rs b/matrix_sdk_crypto/src/olm/signing.rs index 95dc5e65..0f47a81f 100644 --- a/matrix_sdk_crypto/src/olm/signing.rs +++ b/matrix_sdk_crypto/src/olm/signing.rs @@ -499,12 +499,10 @@ mod test { async fn private_identity_creation() { let identity = PrivateCrossSigningIdentity::new(user_id()).await; - assert!(identity - .master_key - .lock() - .await - .as_ref() - .unwrap() + let master_key = identity.master_key.lock().await; + let master_key = master_key.as_ref().unwrap(); + + assert!(master_key .public_key .verify_subkey( &identity @@ -517,12 +515,7 @@ mod test { ) .is_ok()); - assert!(identity - .master_key - .lock() - .await - .as_ref() - .unwrap() + assert!(master_key .public_key .verify_subkey( &identity