diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 4e5f1126..c977755c 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -56,7 +56,7 @@ use mime::{self, Mime}; #[cfg(feature = "sso_login")] use rand::{thread_rng, Rng}; use reqwest::header::InvalidHeaderValue; -use ruma::{api::SendAccessToken, events::AnyMessageEventContent, identifiers::MxcUri}; +use ruma::{api::SendAccessToken, events::AnyMessageEventContent, MxcUri}; #[cfg(feature = "sso_login")] use tokio::{net::TcpListener, sync::oneshot}; #[cfg(feature = "sso_login")] diff --git a/matrix_sdk/src/room/joined.rs b/matrix_sdk/src/room/joined.rs index e6fad924..2d5be644 100644 --- a/matrix_sdk/src/room/joined.rs +++ b/matrix_sdk/src/room/joined.rs @@ -38,8 +38,8 @@ use ruma::{ }, AnyMessageEventContent, AnyStateEventContent, }, - identifiers::{EventId, UserId}, receipt::ReceiptType, + EventId, UserId, }; #[cfg(feature = "encryption")] use tracing::instrument; diff --git a/matrix_sdk/src/verification/sas.rs b/matrix_sdk/src/verification/sas.rs index c2e90dfe..76d1df92 100644 --- a/matrix_sdk/src/verification/sas.rs +++ b/matrix_sdk/src/verification/sas.rs @@ -42,7 +42,7 @@ impl SasVerification { /// # use matrix_sdk::Client; /// # use futures::executor::block_on; /// # use url::Url; - /// # use ruma::identifiers::user_id; + /// # use ruma::user_id; /// use matrix_sdk::verification::SasVerification; /// use matrix_sdk_base::crypto::AcceptSettings; /// use matrix_sdk::ruma::events::key::verification::ShortAuthenticationString; diff --git a/matrix_sdk_base/examples/state_inspector.rs b/matrix_sdk_base/examples/state_inspector.rs index 5944104c..6aefc443 100644 --- a/matrix_sdk_base/examples/state_inspector.rs +++ b/matrix_sdk_base/examples/state_inspector.rs @@ -6,10 +6,7 @@ use atty::Stream; use clap::{App as Argparse, AppSettings as ArgParseSettings, Arg, ArgMatches, SubCommand}; use futures::executor::block_on; use matrix_sdk_base::{RoomInfo, Store}; -use ruma::{ - events::EventType, - identifiers::{RoomId, UserId}, -}; +use ruma::{events::EventType, RoomId, UserId}; #[cfg(not(target_arch = "wasm32"))] use rustyline::{ completion::{Completer, Pair}, diff --git a/matrix_sdk_base/src/store/memory_store.rs b/matrix_sdk_base/src/store/memory_store.rs index 627d5b9a..6c919a4b 100644 --- a/matrix_sdk_base/src/store/memory_store.rs +++ b/matrix_sdk_base/src/store/memory_store.rs @@ -28,9 +28,9 @@ use ruma::{ AnyGlobalAccountDataEvent, AnyRoomAccountDataEvent, AnyStrippedStateEvent, AnySyncStateEvent, EventType, }, - identifiers::{EventId, MxcUri, RoomId, UserId}, receipt::ReceiptType, serde::Raw, + EventId, MxcUri, RoomId, UserId, }; use tracing::info; @@ -562,10 +562,8 @@ impl StateStore for MemoryStore { mod test { use matrix_sdk_test::async_test; use ruma::{ - api::client::r0::media::get_content_thumbnail::Method, - identifiers::{event_id, mxc_uri, room_id, user_id, UserId}, - receipt::ReceiptType, - uint, + api::client::r0::media::get_content_thumbnail::Method, event_id, mxc_uri, + receipt::ReceiptType, room_id, uint, user_id, UserId, }; use serde_json::json; diff --git a/matrix_sdk_base/src/store/sled_store/mod.rs b/matrix_sdk_base/src/store/sled_store/mod.rs index 31a9ccbd..c1f2baef 100644 --- a/matrix_sdk_base/src/store/sled_store/mod.rs +++ b/matrix_sdk_base/src/store/sled_store/mod.rs @@ -903,6 +903,7 @@ mod test { use matrix_sdk_test::async_test; use ruma::{ api::client::r0::media::get_content_thumbnail::Method, + event_id, events::{ room::{ member::{MemberEventContent, MembershipState}, @@ -910,10 +911,11 @@ mod test { }, AnySyncStateEvent, EventType, Unsigned, }, - identifiers::{event_id, mxc_uri, room_id, user_id, EventId, UserId}, + mxc_uri, receipt::ReceiptType, + room_id, serde::Raw, - uint, MilliSecondsSinceUnixEpoch, + uint, user_id, EventId, MilliSecondsSinceUnixEpoch, UserId, }; use serde_json::json; diff --git a/matrix_sdk_common/src/deserialized_responses.rs b/matrix_sdk_common/src/deserialized_responses.rs index 1a8c28af..24b07dd8 100644 --- a/matrix_sdk_common/src/deserialized_responses.rs +++ b/matrix_sdk_common/src/deserialized_responses.rs @@ -12,9 +12,8 @@ use ruma::{ room::member::MemberEventContent, AnySyncRoomEvent, StateEvent, StrippedStateEvent, SyncStateEvent, Unsigned, }, - identifiers::{DeviceKeyAlgorithm, EventId, RoomId, UserId}, serde::Raw, - DeviceIdBox, MilliSecondsSinceUnixEpoch, + DeviceIdBox, DeviceKeyAlgorithm, EventId, MilliSecondsSinceUnixEpoch, RoomId, UserId, }; use serde::{Deserialize, Serialize}; diff --git a/matrix_sdk_crypto/src/identities/device.rs b/matrix_sdk_crypto/src/identities/device.rs index f57e62ff..fecccaa2 100644 --- a/matrix_sdk_crypto/src/identities/device.rs +++ b/matrix_sdk_crypto/src/identities/device.rs @@ -30,9 +30,7 @@ use ruma::{ forwarded_room_key::ForwardedRoomKeyToDeviceEventContent, room::encrypted::EncryptedEventContent, AnyToDeviceEventContent, }, - identifiers::{ - DeviceId, DeviceIdBox, DeviceKeyAlgorithm, DeviceKeyId, EventEncryptionAlgorithm, UserId, - }, + DeviceId, DeviceIdBox, DeviceKeyAlgorithm, DeviceKeyId, EventEncryptionAlgorithm, UserId, }; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_json::{json, Value}; diff --git a/matrix_sdk_crypto/src/identities/manager.rs b/matrix_sdk_crypto/src/identities/manager.rs index 0af468b7..e8e7fedc 100644 --- a/matrix_sdk_crypto/src/identities/manager.rs +++ b/matrix_sdk_crypto/src/identities/manager.rs @@ -21,9 +21,8 @@ use std::{ use futures::future::join_all; use matrix_sdk_common::executor::spawn; use ruma::{ - api::client::r0::keys::get_keys::Response as KeysQueryResponse, - encryption::DeviceKeys, - identifiers::{DeviceId, DeviceIdBox, UserId}, + api::client::r0::keys::get_keys::Response as KeysQueryResponse, encryption::DeviceKeys, + DeviceId, DeviceIdBox, UserId, }; use tracing::{trace, warn}; diff --git a/matrix_sdk_crypto/src/key_request.rs b/matrix_sdk_crypto/src/key_request.rs index ba3d1287..d089853f 100644 --- a/matrix_sdk_crypto/src/key_request.rs +++ b/matrix_sdk_crypto/src/key_request.rs @@ -30,8 +30,8 @@ use ruma::{ room_key_request::{Action, RequestedKeyInfo, RoomKeyRequestToDeviceEventContent}, AnyToDeviceEvent, AnyToDeviceEventContent, ToDeviceEvent, }, - identifiers::{DeviceId, DeviceIdBox, EventEncryptionAlgorithm, RoomId, UserId}, to_device::DeviceIdOrAllDevices, + DeviceId, DeviceIdBox, EventEncryptionAlgorithm, RoomId, UserId, }; use serde::{Deserialize, Serialize}; use thiserror::Error; diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index 46763f5a..cb02d64e 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -1235,6 +1235,7 @@ pub(crate) mod test { IncomingResponse, }, encryption::OneTimeKey, + event_id, events::{ dummy::DummyToDeviceEventContent, room::{ @@ -1244,10 +1245,8 @@ pub(crate) mod test { AnyMessageEventContent, AnySyncMessageEvent, AnySyncRoomEvent, AnyToDeviceEvent, AnyToDeviceEventContent, SyncMessageEvent, ToDeviceEvent, Unsigned, }, - identifiers::{ - event_id, room_id, user_id, DeviceId, DeviceKeyAlgorithm, DeviceKeyId, UserId, - }, - uint, MilliSecondsSinceUnixEpoch, + room_id, uint, user_id, DeviceId, DeviceKeyAlgorithm, DeviceKeyId, + MilliSecondsSinceUnixEpoch, UserId, }; use serde_json::json; diff --git a/matrix_sdk_crypto/src/olm/account.rs b/matrix_sdk_crypto/src/olm/account.rs index 718080fb..b7292e85 100644 --- a/matrix_sdk_crypto/src/olm/account.rs +++ b/matrix_sdk_crypto/src/olm/account.rs @@ -37,12 +37,9 @@ use ruma::{ room::encrypted::{EncryptedEventContent, EncryptedEventScheme}, AnyToDeviceEvent, ToDeviceEvent, }, - identifiers::{ - DeviceId, DeviceIdBox, DeviceKeyAlgorithm, DeviceKeyId, EventEncryptionAlgorithm, RoomId, - UserId, - }, serde::{CanonicalJsonValue, Raw}, - UInt, + DeviceId, DeviceIdBox, DeviceKeyAlgorithm, DeviceKeyId, EventEncryptionAlgorithm, RoomId, UInt, + UserId, }; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; diff --git a/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs b/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs index 75b6529b..f4babb4f 100644 --- a/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs +++ b/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs @@ -32,8 +32,8 @@ use ruma::{ }, AnySyncRoomEvent, SyncMessageEvent, }, - identifiers::{DeviceKeyAlgorithm, EventEncryptionAlgorithm, RoomId}, serde::Raw, + DeviceKeyAlgorithm, EventEncryptionAlgorithm, RoomId, }; use serde::{Deserialize, Serialize}; use serde_json::Value; diff --git a/matrix_sdk_crypto/src/olm/session.rs b/matrix_sdk_crypto/src/olm/session.rs index 10fdd5ca..a34d901f 100644 --- a/matrix_sdk_crypto/src/olm/session.rs +++ b/matrix_sdk_crypto/src/olm/session.rs @@ -28,7 +28,7 @@ use ruma::{ }, AnyToDeviceEventContent, EventContent, }, - identifiers::{DeviceId, DeviceKeyAlgorithm, UserId}, + DeviceId, DeviceKeyAlgorithm, UserId, }; use serde::{Deserialize, Serialize}; use serde_json::json; diff --git a/matrix_sdk_crypto/src/store/mod.rs b/matrix_sdk_crypto/src/store/mod.rs index 022c5c03..37c413cb 100644 --- a/matrix_sdk_crypto/src/store/mod.rs +++ b/matrix_sdk_crypto/src/store/mod.rs @@ -56,11 +56,8 @@ pub use memorystore::MemoryStore; use olm_rs::errors::{OlmAccountError, OlmGroupSessionError, OlmSessionError}; pub use pickle_key::{EncryptedPickleKey, PickleKey}; use ruma::{ - events::room_key_request::RequestedKeyInfo, - identifiers::{ - DeviceId, DeviceIdBox, DeviceKeyAlgorithm, Error as IdentifierValidationError, RoomId, - UserId, - }, + events::room_key_request::RequestedKeyInfo, identifiers::Error as IdentifierValidationError, + DeviceId, DeviceIdBox, DeviceKeyAlgorithm, RoomId, UserId, }; use serde_json::Error as SerdeError; use thiserror::Error; diff --git a/matrix_sdk_crypto/src/store/sled.rs b/matrix_sdk_crypto/src/store/sled.rs index 8dd547c7..b803496c 100644 --- a/matrix_sdk_crypto/src/store/sled.rs +++ b/matrix_sdk_crypto/src/store/sled.rs @@ -757,9 +757,8 @@ mod test { use matrix_sdk_test::async_test; use olm_rs::outbound_group_session::OlmOutboundGroupSession; use ruma::{ - encryption::SignedKey, - events::room_key_request::RequestedKeyInfo, - identifiers::{room_id, user_id, DeviceId, EventEncryptionAlgorithm, UserId}, + encryption::SignedKey, events::room_key_request::RequestedKeyInfo, room_id, user_id, + DeviceId, EventEncryptionAlgorithm, UserId, }; use tempfile::tempdir; diff --git a/matrix_sdk_crypto/src/verification/event_enums.rs b/matrix_sdk_crypto/src/verification/event_enums.rs index 2c28feb7..39b9d195 100644 --- a/matrix_sdk_crypto/src/verification/event_enums.rs +++ b/matrix_sdk_crypto/src/verification/event_enums.rs @@ -33,9 +33,8 @@ use ruma::{ room::message::{KeyVerificationRequestEventContent, MessageType}, AnyMessageEvent, AnyMessageEventContent, AnyToDeviceEvent, AnyToDeviceEventContent, }, - identifiers::{DeviceId, RoomId, UserId}, serde::CanonicalJsonValue, - MilliSecondsSinceUnixEpoch, + DeviceId, MilliSecondsSinceUnixEpoch, RoomId, UserId, }; use super::FlowId; diff --git a/matrix_sdk_crypto/src/verification/qrcode.rs b/matrix_sdk_crypto/src/verification/qrcode.rs index 003a75de..37a60917 100644 --- a/matrix_sdk_crypto/src/verification/qrcode.rs +++ b/matrix_sdk_crypto/src/verification/qrcode.rs @@ -33,7 +33,7 @@ use ruma::{ }, AnyMessageEventContent, AnyToDeviceEventContent, }, - identifiers::{DeviceIdBox, DeviceKeyAlgorithm, UserId}, + DeviceIdBox, DeviceKeyAlgorithm, UserId, }; use thiserror::Error; @@ -696,7 +696,7 @@ mod test { use matrix_qrcode::QrVerificationData; use matrix_sdk_test::async_test; - use ruma::identifiers::{event_id, room_id, user_id, DeviceIdBox, UserId}; + use ruma::{event_id, room_id, user_id, DeviceIdBox, UserId}; use crate::{ olm::{PrivateCrossSigningIdentity, ReadOnlyAccount}, diff --git a/matrix_sdk_test/src/appservice.rs b/matrix_sdk_test/src/appservice.rs index 23d889b2..8853613a 100644 --- a/matrix_sdk_test/src/appservice.rs +++ b/matrix_sdk_test/src/appservice.rs @@ -1,6 +1,6 @@ use std::convert::TryFrom; -use ruma::{events::AnyRoomEvent, identifiers::room_id}; +use ruma::{events::AnyRoomEvent, room_id}; use serde_json::Value; use crate::{test_json, EventsJson};