Simplify ruma identifier imports
parent
aabda60e9f
commit
4d5768111d
|
@ -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")]
|
||||
|
|
|
@ -38,8 +38,8 @@ use ruma::{
|
|||
},
|
||||
AnyMessageEventContent, AnyStateEventContent,
|
||||
},
|
||||
identifiers::{EventId, UserId},
|
||||
receipt::ReceiptType,
|
||||
EventId, UserId,
|
||||
};
|
||||
#[cfg(feature = "encryption")]
|
||||
use tracing::instrument;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -28,7 +28,7 @@ use ruma::{
|
|||
},
|
||||
AnyToDeviceEventContent, EventContent,
|
||||
},
|
||||
identifiers::{DeviceId, DeviceKeyAlgorithm, UserId},
|
||||
DeviceId, DeviceKeyAlgorithm, UserId,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Reference in New Issue