chore: cleanup clippy warnings

master
Johannes Becker 2021-04-21 10:47:33 +02:00
parent a7c2a645aa
commit 910a45b3d5
4 changed files with 21 additions and 12 deletions

View File

@ -95,7 +95,7 @@ use matrix_sdk_common::{
uiaa::AuthData,
},
assign,
identifiers::{DeviceIdBox, EventId, RoomId, RoomIdOrAliasId, ServerName, UserId},
identifiers::{DeviceIdBox, RoomId, RoomIdOrAliasId, ServerName, UserId},
instant::{Duration, Instant},
locks::RwLock,
presence::PresenceState,
@ -104,11 +104,14 @@ use matrix_sdk_common::{
};
#[cfg(feature = "encryption")]
use matrix_sdk_common::api::r0::{
keys::{get_keys, upload_keys, upload_signing_keys::Request as UploadSigningKeysRequest},
to_device::send_event_to_device::{
Request as RumaToDeviceRequest, Response as ToDeviceResponse,
use matrix_sdk_common::{
api::r0::{
keys::{get_keys, upload_keys, upload_signing_keys::Request as UploadSigningKeysRequest},
to_device::send_event_to_device::{
Request as RumaToDeviceRequest, Response as ToDeviceResponse,
},
},
identifiers::EventId,
};
use matrix_sdk_common::locks::Mutex;

View File

@ -1,5 +1,8 @@
use crate::{room::Common, BaseRoom, Client, Result, RoomType};
use std::{io::Read, ops::Deref, sync::Arc};
use std::{io::Read, ops::Deref};
#[cfg(feature = "encryption")]
use std::sync::Arc;
use matrix_sdk_common::{
api::r0::{

View File

@ -31,10 +31,7 @@ use matrix_sdk_common::{
},
events::{
presence::PresenceEvent,
room::{
history_visibility::HistoryVisibility,
member::{MemberEventContent, MembershipState},
},
room::member::{MemberEventContent, MembershipState},
AnyBasicEvent, AnyStrippedStateEvent, AnySyncRoomEvent, AnySyncStateEvent,
AnyToDeviceEvent, EventContent, StateEvent,
},
@ -46,7 +43,10 @@ use matrix_sdk_common::{
#[cfg(feature = "encryption")]
use matrix_sdk_common::{
api::r0::keys::claim_keys::Request as KeysClaimRequest,
events::{room::encrypted::EncryptedEventContent, AnyMessageEventContent, AnySyncMessageEvent},
events::{
room::{encrypted::EncryptedEventContent, history_visibility::HistoryVisibility},
AnyMessageEventContent, AnySyncMessageEvent,
},
identifiers::DeviceId,
locks::Mutex,
uuid::Uuid,
@ -427,6 +427,7 @@ impl BaseClient {
for event in ruma_timeline.events {
match hoist_room_event_prev_content(&event) {
Ok(mut e) => {
#[allow(clippy::single_match)]
match &mut e {
AnySyncRoomEvent::State(s) => match s {
AnySyncStateEvent::RoomMember(member) => {

View File

@ -15,10 +15,12 @@
use std::{
collections::{BTreeMap, BTreeSet},
ops::Deref,
path::Path,
sync::Arc,
};
#[cfg(feature = "sled_state_store")]
use std::path::Path;
use dashmap::DashMap;
use matrix_sdk_common::{
async_trait,