Skip to content

Commit 4a1249f

Browse files
jplattepoljar
authored andcommitted
chore(examples): Upgrade to Rust edition 2024
1 parent 06732ca commit 4a1249f

File tree

30 files changed

+47
-47
lines changed

30 files changed

+47
-47
lines changed

examples/autojoin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "example-autojoin"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

examples/autojoin/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::{env, process::exit};
22

33
use matrix_sdk::{
4-
config::SyncSettings, ruma::events::room::member::StrippedRoomMemberEvent, Client, Room,
4+
Client, Room, config::SyncSettings, ruma::events::room::member::StrippedRoomMemberEvent,
55
};
6-
use tokio::time::{sleep, Duration};
6+
use tokio::time::{Duration, sleep};
77

88
async fn on_stripped_state_member(
99
room_member: StrippedRoomMemberEvent,

examples/backups/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "example-backups"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

examples/backups/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use anyhow::Result;
22
use clap::Parser;
3-
use futures_util::{pin_mut, StreamExt};
3+
use futures_util::{StreamExt, pin_mut};
44
use matrix_sdk::{
5+
Client,
56
config::SyncSettings,
67
encryption::{backups::BackupState, secret_storage::SecretStore},
7-
Client,
88
};
99
use url::Url;
1010

examples/command_bot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "example-command-bot"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

examples/command_bot/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use std::{env, process::exit};
22

33
use matrix_sdk::{
4+
Client, Room, RoomState,
45
config::SyncSettings,
56
ruma::events::room::message::{
67
MessageType, OriginalSyncRoomMessageEvent, RoomMessageEventContent,
78
},
8-
Client, Room, RoomState,
99
};
1010

1111
async fn on_room_message(event: OriginalSyncRoomMessageEvent, room: Room) {

examples/cross_signing_bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "example-cross-signing-bootstrap"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

examples/cross_signing_bootstrap/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use std::{
66

77
use anyhow::Result;
88
use matrix_sdk::{
9+
Client, LoopCtrl,
910
config::SyncSettings,
1011
encryption::CrossSigningResetAuthType,
11-
ruma::{api::client::uiaa, OwnedUserId},
12-
Client, LoopCtrl,
12+
ruma::{OwnedUserId, api::client::uiaa},
1313
};
1414
use url::Url;
1515

examples/custom_events/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "example-custom-events"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
publish = false
66
license = "Apache-2.0"
77

examples/custom_events/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ use std::{
1313
env,
1414
process::exit,
1515
sync::{
16-
atomic::{AtomicU64, Ordering},
1716
Arc,
17+
atomic::{AtomicU64, Ordering},
1818
},
1919
};
2020

2121
use matrix_sdk::{
22+
Client, Room, RoomState,
2223
config::SyncSettings,
2324
event_handler::Ctx,
2425
ruma::{
26+
OwnedEventId,
2527
events::{
2628
macros::EventContent,
2729
room::{
2830
member::StrippedRoomMemberEvent,
2931
message::{MessageType, OriginalSyncRoomMessageEvent},
3032
},
3133
},
32-
OwnedEventId,
3334
},
34-
Client, Room, RoomState,
3535
};
3636
use serde::{Deserialize, Serialize};
37-
use tokio::time::{sleep, Duration};
37+
use tokio::time::{Duration, sleep};
3838

3939
// We use ruma to define our custom events. Just declare the events content
4040
// by deriving from `EventContent` and define `ruma_events` for the metadata

0 commit comments

Comments
 (0)