diff --git a/matrix_sdk_crypto/src/verification/sas/sas_state.rs b/matrix_sdk_crypto/src/verification/sas/sas_state.rs index d2a70be8..28506898 100644 --- a/matrix_sdk_crypto/src/verification/sas/sas_state.rs +++ b/matrix_sdk_crypto/src/verification/sas/sas_state.rs @@ -440,13 +440,10 @@ impl SasState { let their_pubkey = mem::take(&mut event.content.key); - // The SAS object clears the public key, so we make a copy. - let pubkey_copy = their_pubkey.clone(); - self.inner .lock() .unwrap() - .set_their_public_key(&pubkey_copy) + .set_their_public_key(their_pubkey.clone()) .expect("Can't set public key"); Ok(SasState { @@ -489,13 +486,10 @@ impl SasState { } else { let their_pubkey = mem::take(&mut event.content.key); - // The SAS object clears the public key, so we make a copy. - let pubkey_copy = their_pubkey.clone(); - self.inner .lock() .unwrap() - .set_their_public_key(&pubkey_copy) + .set_their_public_key(their_pubkey.clone()) .expect("Can't set public key"); Ok(SasState {