Skip to content

Commit 8d7497e

Browse files
committed
chore(base): Restore rustfmt.
1 parent 09fed8e commit 8d7497e

File tree

1 file changed

+17
-26
lines changed
  • crates/matrix-sdk-base/src/sliding_sync

1 file changed

+17
-26
lines changed

crates/matrix-sdk-base/src/sliding_sync/http.rs

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use std::collections::BTreeMap;
2222

2323
/// Same trait as [`std::convert::From`].
2424
///
25-
/// Because we are converting types that all live in another
26-
// crate (`ruma`), we cannot implement `From` on them, so we
27-
// need a custom local trait, hence this `From` trait.
25+
/// Because we are converting types that all live in another crate (`ruma`), we
26+
/// cannot implement `From` on them, so we need a custom local trait, hence this
27+
/// `From` trait.
2828
pub trait From<T>: Sized {
2929
/// See [`std::convert::From::from`].
3030
fn from(value: T) -> Self;
@@ -60,9 +60,9 @@ where
6060

6161
/// Same trait as [`std::convert::Into`].
6262
///
63-
/// Because we are converting types that all live in another
64-
// crate (`ruma`), we cannot implement `Into` on them, so we
65-
// need a custom local trait, hence this `Into` trait.
63+
/// Because we are converting types that all live in another crate (`ruma`), we
64+
/// cannot implement `Into` on them, so we need a custom local trait, hence this
65+
/// `Into` trait.
6666
pub trait Into<T>: Sized {
6767
/// See [`std::convert::Into::into`].
6868
#[must_use]
@@ -82,36 +82,26 @@ where
8282

8383
/// HTTP types from MSC3575, renamed to match the Simplified MSC3575 namings.
8484
pub mod msc3575 {
85-
use super::{simplified_msc3575 as sss, From};
8685
use ruma::{api::client::sync::sync_events::v4, events::TimelineEventType};
87-
88-
// Request types.
8986
pub use v4::{
90-
ExtensionsConfig as RequestExtensions, Request, RoomDetailsConfig as RequestRoomDetails,
91-
RoomSubscription as RequestRoomSubscription, SyncRequestList as RequestList,
87+
Extensions as ResponseExtensions, ExtensionsConfig as RequestExtensions, Request, Response,
88+
RoomDetailsConfig as RequestRoomDetails, RoomSubscription as RequestRoomSubscription,
89+
SlidingSyncRoom as ResponseRoom, SlidingSyncRoomHero as ResponseRoomHero,
90+
SyncList as ResponseList, SyncRequestList as RequestList,
9291
SyncRequestListFilters as RequestListFilters,
9392
};
9493

95-
// Response types.
96-
pub use v4::{
97-
Extensions as ResponseExtensions, Response, SlidingSyncRoom as ResponseRoom,
98-
SlidingSyncRoomHero as ResponseRoomHero, SyncList as ResponseList,
99-
};
94+
use super::{simplified_msc3575 as sss, From};
10095

10196
/// HTTP types for MSC3575 extensions, renamed to match the Simplified
10297
/// MSC3575 namings.
10398
pub mod extensions {
104-
// Request types.
10599
pub use super::v4::{
106-
AccountDataConfig as RequestAccountData, E2EEConfig as RequestE2EE,
100+
AccountData as ResponseAccountData, AccountDataConfig as RequestAccountData,
101+
E2EEConfig as RequestE2EE, Receipts as ResponseReceipts,
107102
ReceiptsConfig as RequestReceipts, RoomReceiptConfig as RequestReceiptsRoom,
108-
ToDeviceConfig as RequestToDevice, TypingConfig as RequestTyping,
109-
};
110-
111-
// Response types.
112-
pub use super::v4::{
113-
AccountData as ResponseAccountData, Receipts as ResponseReceipts,
114-
ToDevice as ResponseToDevice, Typing as ResponseTyping, E2EE as ResponseE2EE,
103+
ToDevice as ResponseToDevice, ToDeviceConfig as RequestToDevice,
104+
Typing as ResponseTyping, TypingConfig as RequestTyping, E2EE as ResponseE2EE,
115105
};
116106
}
117107

@@ -272,9 +262,10 @@ pub mod msc3575 {
272262

273263
/// HTTP types from Simplified MSC3575.
274264
pub mod simplified_msc3575 {
275-
use super::{msc3575 as ss, From};
276265
pub use ruma::api::client::sync::sync_events::v5::*;
277266

267+
use super::{msc3575 as ss, From};
268+
278269
impl From<ss::Response> for Response {
279270
fn from(value: ss::Response) -> Self {
280271
let mut s = Self::new(value.pos);

0 commit comments

Comments
 (0)