diff --git a/examples/autojoin/Cargo.toml b/examples/autojoin/Cargo.toml index 2e1a8a051..792832880 100644 --- a/examples/autojoin/Cargo.toml +++ b/examples/autojoin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-autojoin" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/autojoin/src/main.rs b/examples/autojoin/src/main.rs index 6a4ac365a..4991c9f49 100644 --- a/examples/autojoin/src/main.rs +++ b/examples/autojoin/src/main.rs @@ -1,9 +1,9 @@ use std::{env, process::exit}; use matrix_sdk::{ - config::SyncSettings, ruma::events::room::member::StrippedRoomMemberEvent, Client, Room, + Client, Room, config::SyncSettings, ruma::events::room::member::StrippedRoomMemberEvent, }; -use tokio::time::{sleep, Duration}; +use tokio::time::{Duration, sleep}; async fn on_stripped_state_member( room_member: StrippedRoomMemberEvent, diff --git a/examples/backups/Cargo.toml b/examples/backups/Cargo.toml index 0e268b722..ed6174a11 100644 --- a/examples/backups/Cargo.toml +++ b/examples/backups/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-backups" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/backups/src/main.rs b/examples/backups/src/main.rs index d7e1ae62b..897e48b10 100644 --- a/examples/backups/src/main.rs +++ b/examples/backups/src/main.rs @@ -1,10 +1,10 @@ use anyhow::Result; use clap::Parser; -use futures_util::{pin_mut, StreamExt}; +use futures_util::{StreamExt, pin_mut}; use matrix_sdk::{ + Client, config::SyncSettings, encryption::{backups::BackupState, secret_storage::SecretStore}, - Client, }; use url::Url; diff --git a/examples/command_bot/Cargo.toml b/examples/command_bot/Cargo.toml index d1049e84a..bff245815 100644 --- a/examples/command_bot/Cargo.toml +++ b/examples/command_bot/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-command-bot" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/command_bot/src/main.rs b/examples/command_bot/src/main.rs index f51b35e27..908290d83 100644 --- a/examples/command_bot/src/main.rs +++ b/examples/command_bot/src/main.rs @@ -1,11 +1,11 @@ use std::{env, process::exit}; use matrix_sdk::{ + Client, Room, RoomState, config::SyncSettings, ruma::events::room::message::{ MessageType, OriginalSyncRoomMessageEvent, RoomMessageEventContent, }, - Client, Room, RoomState, }; async fn on_room_message(event: OriginalSyncRoomMessageEvent, room: Room) { diff --git a/examples/cross_signing_bootstrap/Cargo.toml b/examples/cross_signing_bootstrap/Cargo.toml index 6f8af0fe2..30058df35 100644 --- a/examples/cross_signing_bootstrap/Cargo.toml +++ b/examples/cross_signing_bootstrap/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-cross-signing-bootstrap" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/cross_signing_bootstrap/src/main.rs b/examples/cross_signing_bootstrap/src/main.rs index 9a6881a49..530a80ab8 100644 --- a/examples/cross_signing_bootstrap/src/main.rs +++ b/examples/cross_signing_bootstrap/src/main.rs @@ -6,10 +6,10 @@ use std::{ use anyhow::Result; use matrix_sdk::{ + Client, LoopCtrl, config::SyncSettings, encryption::CrossSigningResetAuthType, - ruma::{api::client::uiaa, OwnedUserId}, - Client, LoopCtrl, + ruma::{OwnedUserId, api::client::uiaa}, }; use url::Url; diff --git a/examples/custom_events/Cargo.toml b/examples/custom_events/Cargo.toml index 86b8cc8fc..7b4f0488b 100644 --- a/examples/custom_events/Cargo.toml +++ b/examples/custom_events/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-custom-events" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/custom_events/src/main.rs b/examples/custom_events/src/main.rs index d88dc5ffa..fe1795c8c 100644 --- a/examples/custom_events/src/main.rs +++ b/examples/custom_events/src/main.rs @@ -13,15 +13,17 @@ use std::{ env, process::exit, sync::{ - atomic::{AtomicU64, Ordering}, Arc, + atomic::{AtomicU64, Ordering}, }, }; use matrix_sdk::{ + Client, Room, RoomState, config::SyncSettings, event_handler::Ctx, ruma::{ + OwnedEventId, events::{ macros::EventContent, room::{ @@ -29,12 +31,10 @@ use matrix_sdk::{ message::{MessageType, OriginalSyncRoomMessageEvent}, }, }, - OwnedEventId, }, - Client, Room, RoomState, }; use serde::{Deserialize, Serialize}; -use tokio::time::{sleep, Duration}; +use tokio::time::{Duration, sleep}; // We use ruma to define our custom events. Just declare the events content // by deriving from `EventContent` and define `ruma_events` for the metadata diff --git a/examples/emoji_verification/Cargo.toml b/examples/emoji_verification/Cargo.toml index 770750c03..ea0e36979 100644 --- a/examples/emoji_verification/Cargo.toml +++ b/examples/emoji_verification/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-emoji-verification" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/emoji_verification/src/main.rs b/examples/emoji_verification/src/main.rs index a47f444ed..f3a1e7d01 100644 --- a/examples/emoji_verification/src/main.rs +++ b/examples/emoji_verification/src/main.rs @@ -4,19 +4,19 @@ use anyhow::Result; use clap::Parser; use futures_util::stream::StreamExt; use matrix_sdk::{ + Client, config::SyncSettings, encryption::verification::{ - format_emojis, Emoji, SasState, SasVerification, Verification, VerificationRequest, - VerificationRequestState, + Emoji, SasState, SasVerification, Verification, VerificationRequest, + VerificationRequestState, format_emojis, }, ruma::{ + UserId, events::{ key::verification::request::ToDeviceKeyVerificationRequestEvent, room::message::{MessageType, OriginalSyncRoomMessageEvent}, }, - UserId, }, - Client, }; use url::Url; diff --git a/examples/get_profiles/Cargo.toml b/examples/get_profiles/Cargo.toml index eeb733f5b..e871a9520 100644 --- a/examples/get_profiles/Cargo.toml +++ b/examples/get_profiles/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-get-profiles" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/get_profiles/src/main.rs b/examples/get_profiles/src/main.rs index 222f51bab..4e57773b6 100644 --- a/examples/get_profiles/src/main.rs +++ b/examples/get_profiles/src/main.rs @@ -1,8 +1,8 @@ use std::{env, process::exit}; use matrix_sdk::{ - ruma::{api::client::profile, OwnedMxcUri, UserId}, Client, Result as MatrixResult, + ruma::{OwnedMxcUri, UserId, api::client::profile}, }; use url::Url; diff --git a/examples/getting_started/Cargo.toml b/examples/getting_started/Cargo.toml index 1d4106f34..07db37984 100644 --- a/examples/getting_started/Cargo.toml +++ b/examples/getting_started/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-getting-started" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/getting_started/src/main.rs b/examples/getting_started/src/main.rs index 2e6d94387..3ecf62ccd 100644 --- a/examples/getting_started/src/main.rs +++ b/examples/getting_started/src/main.rs @@ -13,14 +13,14 @@ use std::{env, process::exit}; use matrix_sdk::{ + Client, Room, RoomState, config::SyncSettings, ruma::events::room::{ member::StrippedRoomMemberEvent, message::{MessageType, OriginalSyncRoomMessageEvent, RoomMessageEventContent}, }, - Client, Room, RoomState, }; -use tokio::time::{sleep, Duration}; +use tokio::time::{Duration, sleep}; /// This is the starting point of the app. `main` is called by rust binaries to /// run the program in this case, we use tokio (a reactor) to allow us to use diff --git a/examples/image_bot/Cargo.toml b/examples/image_bot/Cargo.toml index be6213784..e90f8d4f1 100644 --- a/examples/image_bot/Cargo.toml +++ b/examples/image_bot/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-image-bot" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/image_bot/src/main.rs b/examples/image_bot/src/main.rs index ec5f253ee..9ee994be6 100644 --- a/examples/image_bot/src/main.rs +++ b/examples/image_bot/src/main.rs @@ -1,10 +1,10 @@ use std::{env, fs, process::exit}; use matrix_sdk::{ + Client, Room, RoomState, attachment::AttachmentConfig, config::SyncSettings, ruma::events::room::message::{MessageType, OriginalSyncRoomMessageEvent}, - Client, Room, RoomState, }; use url::Url; diff --git a/examples/login/Cargo.toml b/examples/login/Cargo.toml index 93e5f4ece..e7174893e 100644 --- a/examples/login/Cargo.toml +++ b/examples/login/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-login" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/login/src/main.rs b/examples/login/src/main.rs index 9864015e5..7a56646f5 100644 --- a/examples/login/src/main.rs +++ b/examples/login/src/main.rs @@ -6,12 +6,12 @@ use std::{ use anyhow::anyhow; use matrix_sdk::{ + Client, Room, RoomState, config::SyncSettings, ruma::{ api::client::session::get_login_types::v3::{IdentityProvider, LoginType}, events::room::message::{MessageType, OriginalSyncRoomMessageEvent}, }, - Client, Room, RoomState, }; use url::Url; diff --git a/examples/oauth_cli/Cargo.toml b/examples/oauth_cli/Cargo.toml index a9b3b0ab0..6a2c2584b 100644 --- a/examples/oauth_cli/Cargo.toml +++ b/examples/oauth_cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-oauth-cli" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/oauth_cli/src/main.rs b/examples/oauth_cli/src/main.rs index 9ff569071..e63ab9ab8 100644 --- a/examples/oauth_cli/src/main.rs +++ b/examples/oauth_cli/src/main.rs @@ -22,24 +22,24 @@ use std::{ use anyhow::bail; use futures_util::StreamExt; use matrix_sdk::{ + Client, ClientBuildError, Result, RoomState, authentication::oauth::{ - error::OAuthClientRegistrationError, - registration::{ApplicationType, ClientMetadata, Localized, OAuthGrantType}, AccountManagementActionFull, ClientId, OAuthAuthorizationData, OAuthError, OAuthSession, UrlOrQuery, UserSession, + error::OAuthClientRegistrationError, + registration::{ApplicationType, ClientMetadata, Localized, OAuthGrantType}, }, config::SyncSettings, - encryption::{recovery::RecoveryState, CrossSigningResetAuthType}, + encryption::{CrossSigningResetAuthType, recovery::RecoveryState}, room::Room, ruma::{ events::room::message::{MessageType, OriginalSyncRoomMessageEvent}, serde::Raw, }, utils::local_server::{LocalServerBuilder, LocalServerRedirectHandle, QueryString}, - Client, ClientBuildError, Result, RoomState, }; use matrix_sdk_ui::sync_service::SyncService; -use rand::{distributions::Alphanumeric, thread_rng, Rng}; +use rand::{Rng, distributions::Alphanumeric, thread_rng}; use serde::{Deserialize, Serialize}; use tokio::{fs, io::AsyncBufReadExt as _}; use url::Url; diff --git a/examples/persist_session/Cargo.toml b/examples/persist_session/Cargo.toml index d1b1a6899..43ac15fe3 100644 --- a/examples/persist_session/Cargo.toml +++ b/examples/persist_session/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-persist-session" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/persist_session/src/main.rs b/examples/persist_session/src/main.rs index 248612ccc..16b2d8671 100644 --- a/examples/persist_session/src/main.rs +++ b/examples/persist_session/src/main.rs @@ -4,15 +4,15 @@ use std::{ }; use matrix_sdk::{ + Client, Error, LoopCtrl, Room, RoomState, authentication::matrix::MatrixSession, config::SyncSettings, ruma::{ api::client::filter::FilterDefinition, events::room::message::{MessageType, OriginalSyncRoomMessageEvent}, }, - Client, Error, LoopCtrl, Room, RoomState, }; -use rand::{distributions::Alphanumeric, thread_rng, Rng}; +use rand::{Rng, distributions::Alphanumeric, thread_rng}; use serde::{Deserialize, Serialize}; use tokio::fs; diff --git a/examples/qr-login/Cargo.toml b/examples/qr-login/Cargo.toml index 868ba6bbc..6b1a2924d 100644 --- a/examples/qr-login/Cargo.toml +++ b/examples/qr-login/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-qr-login" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/qr-login/src/main.rs b/examples/qr-login/src/main.rs index 43c6c69c5..bf1e99791 100644 --- a/examples/qr-login/src/main.rs +++ b/examples/qr-login/src/main.rs @@ -1,15 +1,15 @@ use std::io::Write; -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use clap::Parser; use futures_util::StreamExt; use matrix_sdk::{ + Client, authentication::oauth::{ qrcode::{LoginProgress, QrCodeData, QrCodeModeData}, registration::{ApplicationType, ClientMetadata, Localized, OAuthGrantType}, }, ruma::serde::Raw, - Client, }; use url::Url; diff --git a/examples/secret_storage/Cargo.toml b/examples/secret_storage/Cargo.toml index 5db5df16b..5ae09c944 100644 --- a/examples/secret_storage/Cargo.toml +++ b/examples/secret_storage/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-secret-storage" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/secret_storage/src/main.rs b/examples/secret_storage/src/main.rs index d8259e1fc..3d933b07b 100644 --- a/examples/secret_storage/src/main.rs +++ b/examples/secret_storage/src/main.rs @@ -1,10 +1,10 @@ use anyhow::Result; use clap::{Parser, Subcommand}; use matrix_sdk::{ + AuthSession, Client, SessionMeta, SessionTokens, authentication::matrix::MatrixSession, encryption::secret_storage::SecretStore, - ruma::{events::secret::request::SecretName, OwnedDeviceId, OwnedUserId}, - AuthSession, Client, SessionMeta, SessionTokens, + ruma::{OwnedDeviceId, OwnedUserId, events::secret::request::SecretName}, }; use url::Url; diff --git a/examples/timeline/Cargo.toml b/examples/timeline/Cargo.toml index 769bf24aa..1285e3baa 100644 --- a/examples/timeline/Cargo.toml +++ b/examples/timeline/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "example-timeline" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false license = "Apache-2.0" diff --git a/examples/timeline/src/main.rs b/examples/timeline/src/main.rs index 5b3d2bc40..aa2b662fe 100644 --- a/examples/timeline/src/main.rs +++ b/examples/timeline/src/main.rs @@ -1,7 +1,7 @@ use anyhow::Result; use clap::Parser; use futures_util::StreamExt; -use matrix_sdk::{config::SyncSettings, ruma::OwnedRoomId, Client}; +use matrix_sdk::{Client, config::SyncSettings, ruma::OwnedRoomId}; use matrix_sdk_ui::timeline::RoomExt; use url::Url;