Skip to content

Commit 72b2763

Browse files
committed
chore(base): Run rustfmt from nightly.
1 parent 7278a36 commit 72b2763

File tree

5 files changed

+42
-42
lines changed

5 files changed

+42
-42
lines changed

crates/matrix-sdk-base/src/rooms/call.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ mod tests {
5858
},
5959
room_id, user_id, DeviceId, EventId, MilliSecondsSinceUnixEpoch, OwnedUserId, UserId,
6060
};
61-
6261
use similar_asserts::assert_eq;
6362

6463
use super::super::{Room, RoomState};

crates/matrix-sdk-base/src/rooms/display_name.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ use ruma::{
2323
use serde::{Deserialize, Serialize};
2424
use tracing::{debug, trace, warn};
2525

26+
use super::{Room, RoomMemberships};
2627
use crate::{
2728
deserialized_responses::SyncOrStrippedState,
2829
store::{Result as StoreResult, StateStoreExt},
2930
RoomMember, RoomState,
3031
};
3132

32-
use super::{Room, RoomMemberships};
33-
3433
impl Room {
3534
/// Calculate a room's display name, or return the cached value, taking into
3635
/// account its name, aliases and members.
@@ -513,13 +512,6 @@ mod tests {
513512
use std::{collections::BTreeSet, sync::Arc};
514513

515514
use matrix_sdk_test::{async_test, event_factory::EventFactory};
516-
use serde_json::json;
517-
518-
use super::{compute_display_name_from_heroes, Room, RoomDisplayName};
519-
use crate::{
520-
store::MemoryStore, MinimalStateEvent, OriginalMinimalStateEvent, RoomState, StateChanges,
521-
StateStore,
522-
};
523515
use ruma::{
524516
api::client::sync::sync_events::v3::RoomSummary as RumaSummary,
525517
assign,
@@ -535,6 +527,13 @@ mod tests {
535527
serde::Raw,
536528
user_id, UserId,
537529
};
530+
use serde_json::json;
531+
532+
use super::{compute_display_name_from_heroes, Room, RoomDisplayName};
533+
use crate::{
534+
store::MemoryStore, MinimalStateEvent, OriginalMinimalStateEvent, RoomState, StateChanges,
535+
StateStore,
536+
};
538537

539538
fn make_room_test_helper(room_type: RoomState) -> (Arc<MemoryStore>, Room) {
540539
let store = Arc::new(MemoryStore::new());

crates/matrix-sdk-base/src/rooms/latest_event.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#[cfg(feature = "e2e-encryption")]
1616
use std::{collections::BTreeMap, num::NonZeroUsize};
1717

18+
#[cfg(feature = "e2e-encryption")]
19+
use ruma::{events::AnySyncTimelineEvent, serde::Raw, OwnedRoomId};
20+
1821
use super::Room;
1922
#[cfg(feature = "e2e-encryption")]
2023
use super::RoomInfoNotableUpdateReasons;
2124
use crate::latest_event::LatestEvent;
2225

23-
#[cfg(feature = "e2e-encryption")]
24-
use ruma::{events::AnySyncTimelineEvent, serde::Raw, OwnedRoomId};
25-
2626
impl Room {
2727
/// The size of the latest_encrypted_events RingBuffer
2828
#[cfg(feature = "e2e-encryption")]
@@ -81,6 +81,12 @@ impl Room {
8181
mod tests_with_e2e_encryption {
8282
use std::sync::Arc;
8383

84+
use assert_matches::assert_matches;
85+
use matrix_sdk_common::deserialized_responses::TimelineEvent;
86+
use matrix_sdk_test::async_test;
87+
use ruma::{room_id, serde::Raw, user_id};
88+
use serde_json::json;
89+
8490
use crate::{
8591
latest_event::LatestEvent,
8692
response_processors as processors,
@@ -89,12 +95,6 @@ mod tests_with_e2e_encryption {
8995
SessionMeta, StateChanges,
9096
};
9197

92-
use assert_matches::assert_matches;
93-
use matrix_sdk_common::deserialized_responses::TimelineEvent;
94-
use matrix_sdk_test::async_test;
95-
use ruma::{room_id, serde::Raw, user_id};
96-
use serde_json::json;
97-
9898
fn make_room_test_helper(room_type: RoomState) -> (Arc<MemoryStore>, Room) {
9999
let store = Arc::new(MemoryStore::new());
100100
let user_id = user_id!("@me:example.org");

crates/matrix-sdk-base/src/rooms/mod.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ mod room_info;
2525
mod state;
2626
mod tags;
2727

28-
use crate::{
29-
deserialized_responses::MemberEvent,
30-
notification_settings::RoomNotificationMode,
31-
read_receipts::RoomReadReceipts,
32-
store::{DynStateStore, Result as StoreResult, StateStoreExt},
33-
sync::UnreadNotificationsCount,
34-
Error, MinimalStateEvent,
28+
#[cfg(feature = "e2e-encryption")]
29+
use std::sync::RwLock as SyncRwLock;
30+
use std::{
31+
collections::{BTreeMap, HashSet},
32+
sync::Arc,
3533
};
34+
3635
pub use create::*;
3736
pub use display_name::{RoomDisplayName, RoomHero};
3837
pub(crate) use display_name::{RoomSummary, UpdatedRoomDisplayName};
@@ -66,16 +65,19 @@ use ruma::{
6665
};
6766
use serde::{Deserialize, Serialize};
6867
pub use state::{RoomState, RoomStateFilter};
69-
#[cfg(feature = "e2e-encryption")]
70-
use std::sync::RwLock as SyncRwLock;
71-
use std::{
72-
collections::{BTreeMap, HashSet},
73-
sync::Arc,
74-
};
7568
pub(crate) use tags::RoomNotableTags;
7669
use tokio::sync::broadcast;
7770
use tracing::{info, instrument, warn};
7871

72+
use crate::{
73+
deserialized_responses::MemberEvent,
74+
notification_settings::RoomNotificationMode,
75+
read_receipts::RoomReadReceipts,
76+
store::{DynStateStore, Result as StoreResult, StateStoreExt},
77+
sync::UnreadNotificationsCount,
78+
Error, MinimalStateEvent,
79+
};
80+
7981
/// The underlying room data structure collecting state for joined, left and
8082
/// invited rooms.
8183
#[derive(Debug, Clone)]

crates/matrix-sdk-base/src/rooms/room_info.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,16 +1157,6 @@ impl Default for RoomInfoNotableUpdateReasons {
11571157
mod tests {
11581158
use std::sync::Arc;
11591159

1160-
use super::{BaseRoomInfo, RoomInfo, SyncInfo};
1161-
use crate::{
1162-
latest_event::LatestEvent,
1163-
notification_settings::RoomNotificationMode,
1164-
rooms::{RoomNotableTags, RoomSummary},
1165-
store::{IntoStateStore, MemoryStore},
1166-
sync::UnreadNotificationsCount,
1167-
RoomDisplayName, RoomHero, RoomState, StateChanges,
1168-
};
1169-
11701160
use matrix_sdk_common::deserialized_responses::TimelineEvent;
11711161
use matrix_sdk_test::{
11721162
async_test,
@@ -1178,6 +1168,16 @@ mod tests {
11781168
};
11791169
use serde_json::json;
11801170

1171+
use super::{BaseRoomInfo, RoomInfo, SyncInfo};
1172+
use crate::{
1173+
latest_event::LatestEvent,
1174+
notification_settings::RoomNotificationMode,
1175+
rooms::{RoomNotableTags, RoomSummary},
1176+
store::{IntoStateStore, MemoryStore},
1177+
sync::UnreadNotificationsCount,
1178+
RoomDisplayName, RoomHero, RoomState, StateChanges,
1179+
};
1180+
11811181
#[test]
11821182
fn test_room_info_serialization() {
11831183
// This test exists to make sure we don't accidentally change the

0 commit comments

Comments
 (0)