diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index b2dad9ce..b7fcf191 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -1275,7 +1275,7 @@ impl Client { for request in self.base_client.outgoing_to_device_requests().await { let transaction_id = request.txn_id.clone(); - if let Ok(_) = self.send(request).await { + if self.send(request).await.is_ok() { self.base_client .mark_to_device_request_as_sent(&transaction_id) .await; diff --git a/matrix_sdk_crypto/src/verification/sas/sas_state.rs b/matrix_sdk_crypto/src/verification/sas/sas_state.rs index 61573cd1..9b638bf0 100644 --- a/matrix_sdk_crypto/src/verification/sas/sas_state.rs +++ b/matrix_sdk_crypto/src/verification/sas/sas_state.rs @@ -43,11 +43,11 @@ use super::helpers::{get_decimal, get_emoji, get_mac_content, receive_mac_event, use crate::{Account, Device}; -const KEY_AGREEMENT_PROTOCOLS: &'static [KeyAgreementProtocol] = +const KEY_AGREEMENT_PROTOCOLS: &[KeyAgreementProtocol] = &[KeyAgreementProtocol::Curve25519HkdfSha256]; -const HASHES: &'static [HashAlgorithm] = &[HashAlgorithm::Sha256]; -const MACS: &'static [MessageAuthenticationCode] = &[MessageAuthenticationCode::HkdfHmacSha256]; -const STRINGS: &'static [ShortAuthenticationString] = &[ +const HASHES: &[HashAlgorithm] = &[HashAlgorithm::Sha256]; +const MACS: &[MessageAuthenticationCode] = &[MessageAuthenticationCode::HkdfHmacSha256]; +const STRINGS: &[ShortAuthenticationString] = &[ ShortAuthenticationString::Decimal, ShortAuthenticationString::Emoji, ]; @@ -233,7 +233,7 @@ impl SasState { account, other_device, }, - verification_flow_id: Arc::new(verification_flow_id.clone()), + verification_flow_id: Arc::new(verification_flow_id), state: Arc::new(Created { protocol_definitions: MSasV1ContentInit {