Skip to content

Commit 94e7ddd

Browse files
jplatteHywan
authored andcommitted
chore: Upgrade matrix-sdk to edition 2024 and format
1 parent 6ac4a84 commit 94e7ddd

File tree

15 files changed

+33
-33
lines changed

15 files changed

+33
-33
lines changed

crates/matrix-sdk-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
authors = ["Damir Jelić <[email protected]>"]
33
description = "Collection of common types and imports used in the matrix-sdk"
4-
edition = "2021"
4+
edition = "2024"
55
homepage = "https://github.com/matrix-org/matrix-rust-sdk"
66
keywords = ["matrix", "chat", "messaging", "ruma", "nio"]
77
license = "Apache-2.0"

crates/matrix-sdk-common/src/deserialized_responses.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::{collections::BTreeMap, fmt, sync::Arc};
1717
#[cfg(doc)]
1818
use ruma::events::AnyTimelineEvent;
1919
use ruma::{
20+
DeviceKeyAlgorithm, OwnedDeviceId, OwnedEventId, OwnedUserId,
2021
events::{
2122
AnyMessageLikeEvent, AnySyncMessageLikeEvent, AnySyncTimelineEvent, AnyToDeviceEvent,
2223
MessageLikeEventType,
@@ -26,7 +27,6 @@ use ruma::{
2627
AsRefStr, AsStrAsRefStr, DebugAsRefStr, DeserializeFromCowStr, FromString, JsonObject, Raw,
2728
SerializeAsRefStr,
2829
},
29-
DeviceKeyAlgorithm, OwnedDeviceId, OwnedEventId, OwnedUserId,
3030
};
3131
use serde::{Deserialize, Serialize};
3232
use tracing::warn;
@@ -1266,8 +1266,8 @@ mod tests {
12661266
use assert_matches2::assert_let;
12671267
use insta::{assert_json_snapshot, with_settings};
12681268
use ruma::{
1269-
device_id, event_id, events::room::message::RoomMessageEventContent, serde::Raw, user_id,
1270-
DeviceKeyAlgorithm,
1269+
DeviceKeyAlgorithm, device_id, event_id, events::room::message::RoomMessageEventContent,
1270+
serde::Raw, user_id,
12711271
};
12721272
use serde::Deserialize;
12731273
use serde_json::json;

crates/matrix-sdk-common/src/executor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::{
2929
mod sys {
3030
pub use tokio::{
3131
runtime::{Handle, Runtime},
32-
task::{spawn, AbortHandle, JoinError, JoinHandle},
32+
task::{AbortHandle, JoinError, JoinHandle, spawn},
3333
};
3434
}
3535

@@ -43,8 +43,8 @@ mod sys {
4343

4444
pub use futures_util::future::AbortHandle;
4545
use futures_util::{
46-
future::{Abortable, RemoteHandle},
4746
FutureExt,
47+
future::{Abortable, RemoteHandle},
4848
};
4949

5050
/// A Wasm specific version of `tokio::task::JoinError` designed to work

crates/matrix-sdk-common/src/js_tracing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ use std::{
2323
sync::atomic::{AtomicU32, Ordering},
2424
};
2525

26-
use tracing::{field::Field, level_filters::LevelFilter, Event, Level, Metadata};
26+
use tracing::{Event, Level, Metadata, field::Field, level_filters::LevelFilter};
2727
use tracing_subscriber::{
2828
fmt::{
29-
format::{DefaultFields, Writer},
3029
FmtContext, FormatEvent, FormatFields, FormattedFields, MakeWriter, Subscriber,
30+
format::{DefaultFields, Writer},
3131
},
3232
registry::LookupSpan,
3333
};

crates/matrix-sdk-common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub mod ttl_cache;
4242
#[cfg(all(target_family = "wasm", not(tarpaulin_include)))]
4343
pub mod js_tracing;
4444

45-
use ruma::{room_version_rules::RoomVersionRules, RoomVersionId};
45+
use ruma::{RoomVersionId, room_version_rules::RoomVersionRules};
4646
pub use store_locks::LEASE_DURATION_MS;
4747

4848
/// Alias for `Send` on non-wasm, empty trait (implemented by everything) on

crates/matrix-sdk-common/src/linked_chunk/as_vector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use std::{
2222
use eyeball_im::VectorDiff;
2323

2424
use super::{
25-
updates::{ReaderToken, Update, UpdatesInner},
2625
ChunkContent, ChunkIdentifier, Iter, Position,
26+
updates::{ReaderToken, Update, UpdatesInner},
2727
};
2828
use crate::linked_chunk::ChunkMetadata;
2929

@@ -509,7 +509,7 @@ mod tests {
509509
use std::fmt::Debug;
510510

511511
use assert_matches::assert_matches;
512-
use imbl::{vector, Vector};
512+
use imbl::{Vector, vector};
513513

514514
use super::{
515515
super::{Chunk, ChunkIdentifierGenerator, LinkedChunk, Update},

crates/matrix-sdk-common/src/linked_chunk/lazy_loader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ mod tests {
371371
use assert_matches::assert_matches;
372372

373373
use super::{
374-
super::Position, from_all_chunks, from_last_chunk, insert_new_first_chunk, replace_with,
375-
ChunkContent, ChunkIdentifier, ChunkIdentifierGenerator, LazyLoaderError, LinkedChunk,
376-
RawChunk, Update,
374+
super::Position, ChunkContent, ChunkIdentifier, ChunkIdentifierGenerator, LazyLoaderError,
375+
LinkedChunk, RawChunk, Update, from_all_chunks, from_last_chunk, insert_new_first_chunk,
376+
replace_with,
377377
};
378378

379379
#[test]

crates/matrix-sdk-common/src/linked_chunk/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ pub struct ChunkMetadata {
17861786
mod tests {
17871787
use std::{
17881788
ops::Not,
1789-
sync::{atomic::Ordering, Arc},
1789+
sync::{Arc, atomic::Ordering},
17901790
};
17911791

17921792
use assert_matches::assert_matches;

crates/matrix-sdk-common/src/linked_chunk/order_tracker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use std::sync::{Arc, RwLock};
1717
use eyeball_im::VectorDiff;
1818

1919
use super::{
20-
updates::{ReaderToken, Update, UpdatesInner},
2120
Position,
21+
updates::{ReaderToken, Update, UpdatesInner},
2222
};
2323
use crate::linked_chunk::{ChunkMetadata, UpdateToVectorDiff};
2424

@@ -168,8 +168,8 @@ mod tests {
168168
use matrix_sdk_test_macros::async_test;
169169

170170
use crate::linked_chunk::{
171-
lazy_loader::from_last_chunk, ChunkContent, ChunkIdentifier, ChunkIdentifierGenerator,
172-
ChunkMetadata, LinkedChunk, OrderTracker, Position, RawChunk, Update,
171+
ChunkContent, ChunkIdentifier, ChunkIdentifierGenerator, ChunkMetadata, LinkedChunk,
172+
OrderTracker, Position, RawChunk, Update, lazy_loader::from_last_chunk,
173173
};
174174

175175
#[async_test]

crates/matrix-sdk-common/src/ring_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
use std::{
1616
collections::{
17-
vec_deque::{Drain, Iter, IterMut},
1817
VecDeque,
18+
vec_deque::{Drain, Iter, IterMut},
1919
},
2020
num::NonZeroUsize,
2121
ops::RangeBounds,

0 commit comments

Comments
 (0)