Skip to content

Commit

Permalink
Clean up some imports
Browse files Browse the repository at this point in the history
With experimental-sliding-sync enabled and e2e-encryption disabled,
there were a bunch of warnings about unused imports. This fixes them
(but a few warnings about other unused items remain).
  • Loading branch information
jplatte committed Jan 7, 2025
1 parent 2ef14de commit da3f550
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
22 changes: 9 additions & 13 deletions crates/matrix-sdk-base/src/latest_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@

use matrix_sdk_common::deserialized_responses::SyncTimelineEvent;
#[cfg(feature = "e2e-encryption")]
use ruma::events::{
call::{invite::SyncCallInviteEvent, notify::SyncCallNotifyEvent},
poll::unstable_start::SyncUnstablePollStartEvent,
relation::RelationType,
room::message::SyncRoomMessageEvent,
AnySyncMessageLikeEvent, AnySyncTimelineEvent,
};
use ruma::{
events::{
room::{
member::{MembershipState, SyncRoomMemberEvent},
power_levels::RoomPowerLevels,
},
call::{invite::SyncCallInviteEvent, notify::SyncCallNotifyEvent},
poll::unstable_start::SyncUnstablePollStartEvent,
relation::RelationType,
room::member::{MembershipState, SyncRoomMemberEvent},
room::message::SyncRoomMessageEvent,
room::power_levels::RoomPowerLevels,
sticker::SyncStickerEvent,
AnySyncStateEvent,
AnySyncMessageLikeEvent, AnySyncStateEvent, AnySyncTimelineEvent,
},
MxcUri, OwnedEventId, UserId,
UserId,
};
use ruma::{MxcUri, OwnedEventId};
use serde::{Deserialize, Serialize};

use crate::MinimalRoomMemberEvent;
Expand Down
17 changes: 8 additions & 9 deletions crates/matrix-sdk-base/src/sliding_sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,20 @@ use std::{borrow::Cow, collections::BTreeMap};

#[cfg(feature = "e2e-encryption")]
use matrix_sdk_common::deserialized_responses::SyncTimelineEvent;
#[cfg(feature = "e2e-encryption")]
use ruma::api::client::sync::sync_events::v5;
#[cfg(feature = "e2e-encryption")]
use ruma::events::AnyToDeviceEvent;
use ruma::{
api::client::sync::sync_events::v3::{self, InvitedRoom, KnockedRoom},
events::{
room::member::MembershipState, AnyRoomAccountDataEvent, AnyStrippedStateEvent,
AnySyncStateEvent, StateEventType,
AnySyncStateEvent,
},
serde::Raw,
JsOption, OwnedRoomId, RoomId, UInt, UserId,
};
#[cfg(feature = "e2e-encryption")]
use ruma::{api::client::sync::sync_events::v5, events::AnyToDeviceEvent, events::StateEventType};
use tracing::{debug, error, instrument, trace, warn};

use super::BaseClient;
#[cfg(feature = "e2e-encryption")]
use crate::latest_event::{is_suitable_for_latest_event, LatestEvent, PossibleLatestEvent};
#[cfg(feature = "e2e-encryption")]
use crate::RoomMemberships;
use crate::{
error::Result,
read_receipts::{compute_unread_counts, PreviousEventsProvider},
Expand All @@ -55,6 +49,11 @@ use crate::{
sync::{JoinedRoomUpdate, LeftRoomUpdate, Notification, RoomUpdates, SyncResponse},
Room, RoomInfo,
};
#[cfg(feature = "e2e-encryption")]
use crate::{
latest_event::{is_suitable_for_latest_event, LatestEvent, PossibleLatestEvent},
RoomMemberships,
};

impl BaseClient {
#[cfg(feature = "e2e-encryption")]
Expand Down

0 comments on commit da3f550

Please sign in to comment.