matrix-sdk: Fix some clippy warnings.

master
Damir Jelić 2020-07-31 15:18:03 +02:00
parent dce06d31aa
commit 1a40491c0b
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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<Created> {
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 {