From 81e9a7cefc77f82b935ade403ab3c5a092132961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 10 Aug 2020 10:18:57 +0200 Subject: [PATCH] crypto: Pass a String when setting the other SAS pubkey. --- matrix_sdk_crypto/src/verification/sas/sas_state.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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 {