matrix-sdk: Fix some new clippy warnings
parent
2e7f862f9c
commit
2811c490a0
|
@ -1,4 +1,4 @@
|
||||||
use std::{convert::TryFrom, fmt::Debug, io, sync::Arc};
|
use std::{convert::TryFrom, fmt::Debug, sync::Arc};
|
||||||
|
|
||||||
use futures::executor::block_on;
|
use futures::executor::block_on;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
@ -388,7 +388,7 @@ impl Inspector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> io::Result<()> {
|
fn main() {
|
||||||
let argparse = Argparse::new("state-inspector")
|
let argparse = Argparse::new("state-inspector")
|
||||||
.global_setting(ArgParseSettings::DisableVersion)
|
.global_setting(ArgParseSettings::DisableVersion)
|
||||||
.global_setting(ArgParseSettings::VersionlessSubcommands)
|
.global_setting(ArgParseSettings::VersionlessSubcommands)
|
||||||
|
@ -430,6 +430,4 @@ fn main() -> io::Result<()> {
|
||||||
} else {
|
} else {
|
||||||
block_on(inspector.run(matches));
|
block_on(inspector.run(matches));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,20 +495,17 @@ impl BaseClient {
|
||||||
},
|
},
|
||||||
|
|
||||||
#[cfg(feature = "encryption")]
|
#[cfg(feature = "encryption")]
|
||||||
AnySyncRoomEvent::Message(message) => {
|
AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomEncrypted(
|
||||||
if let AnySyncMessageEvent::RoomEncrypted(encrypted) = message {
|
encrypted,
|
||||||
if let Some(olm) = self.olm_machine().await {
|
)) => {
|
||||||
if let Ok(decrypted) =
|
if let Some(olm) = self.olm_machine().await {
|
||||||
olm.decrypt_room_event(encrypted, room_id).await
|
if let Ok(decrypted) =
|
||||||
{
|
olm.decrypt_room_event(encrypted, room_id).await
|
||||||
match decrypted.deserialize() {
|
{
|
||||||
Ok(decrypted) => e = decrypted,
|
match decrypted.deserialize() {
|
||||||
Err(e) => {
|
Ok(decrypted) => e = decrypted,
|
||||||
warn!(
|
Err(e) => {
|
||||||
"Error deserializing a decrypted event {:?} ",
|
warn!("Error deserializing a decrypted event {:?} ", e)
|
||||||
e
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,6 +134,7 @@ impl VerificationRequest {
|
||||||
self.inner.lock().unwrap().accept()
|
self.inner.lock().unwrap().accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::unnecessary_wraps)]
|
||||||
pub(crate) fn receive_ready(
|
pub(crate) fn receive_ready(
|
||||||
&self,
|
&self,
|
||||||
sender: &UserId,
|
sender: &UserId,
|
||||||
|
|
Loading…
Reference in New Issue