Replace matches crate with assert_matches
This commit is contained in:
		
							parent
							
								
									f3dad1ab1f
								
							
						
					
					
						commit
						b34bfaf1f6
					
				@ -27,5 +27,5 @@ serde_json = "1.0.61"
 | 
			
		||||
tracing = { version = "0.1.25", optional = true }
 | 
			
		||||
 | 
			
		||||
[dev-dependencies]
 | 
			
		||||
matches = "0.1.8"
 | 
			
		||||
assert_matches = "1.5.0"
 | 
			
		||||
serde_yaml = "0.8.17"
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use ruma_appservice_api::Registration;
 | 
			
		||||
 | 
			
		||||
#[test]
 | 
			
		||||
 | 
			
		||||
@ -38,4 +38,4 @@ serde = { version = "1.0.118", features = ["derive"] }
 | 
			
		||||
serde_json = "1.0.61"
 | 
			
		||||
 | 
			
		||||
[dev-dependencies]
 | 
			
		||||
matches = "0.1.8"
 | 
			
		||||
assert_matches = "1.5.0"
 | 
			
		||||
 | 
			
		||||
@ -475,7 +475,7 @@ can_be_empty!(IncomingRoomFilter);
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{
 | 
			
		||||
 | 
			
		||||
@ -57,7 +57,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(all(test, any(feature = "client", feature = "server")))]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
 | 
			
		||||
        #[cfg(feature = "server")]
 | 
			
		||||
        #[test]
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(all(test, any(feature = "client", feature = "server")))]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
 | 
			
		||||
        #[cfg(feature = "client")]
 | 
			
		||||
        #[test]
 | 
			
		||||
 | 
			
		||||
@ -109,7 +109,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(all(test, feature = "server"))]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use ruma_common::api::IncomingRequest as _;
 | 
			
		||||
 | 
			
		||||
        use super::{IncomingRequest, MembershipEventFilter};
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(test)]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use ruma_common::{thirdparty::Medium, user_id};
 | 
			
		||||
        use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -80,7 +80,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(test)]
 | 
			
		||||
    mod test {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
        use super::RoomMember;
 | 
			
		||||
 | 
			
		||||
@ -84,7 +84,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(all(test, feature = "server"))]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use ruma_common::api::IncomingRequest as _;
 | 
			
		||||
 | 
			
		||||
        use super::IncomingRequest;
 | 
			
		||||
 | 
			
		||||
@ -285,7 +285,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(test)]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use serde::{Deserialize, Serialize};
 | 
			
		||||
        use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -320,7 +320,7 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(test)]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
        use super::{IncomingLoginInfo, IncomingPassword, IncomingToken};
 | 
			
		||||
 | 
			
		||||
@ -612,8 +612,8 @@ pub mod v3 {
 | 
			
		||||
 | 
			
		||||
    #[cfg(test)]
 | 
			
		||||
    mod tests {
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use assign::assign;
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
        use super::Timeline;
 | 
			
		||||
@ -675,7 +675,7 @@ pub mod v3 {
 | 
			
		||||
    mod server_tests {
 | 
			
		||||
        use std::time::Duration;
 | 
			
		||||
 | 
			
		||||
        use matches::assert_matches;
 | 
			
		||||
        use assert_matches::assert_matches;
 | 
			
		||||
        use ruma_common::{api::IncomingRequest as _, presence::PresenceState};
 | 
			
		||||
 | 
			
		||||
        use super::{IncomingFilter, IncomingRequest};
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_client_api::{
 | 
			
		||||
    error::{ErrorBody, ErrorKind},
 | 
			
		||||
    uiaa::{
 | 
			
		||||
 | 
			
		||||
@ -74,10 +74,10 @@ wildmatch = "2.0.0"
 | 
			
		||||
js-sys = { version = "0.3", optional = true }
 | 
			
		||||
 | 
			
		||||
[dev-dependencies]
 | 
			
		||||
assert_matches = "1.5.0"
 | 
			
		||||
assign = "1.1.1"
 | 
			
		||||
http = "0.2.2"
 | 
			
		||||
maplit = "1.0.2"
 | 
			
		||||
matches = "0.1.8"
 | 
			
		||||
trybuild = "1.0.42"
 | 
			
		||||
 | 
			
		||||
[[bench]]
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ impl IgnoredUserListEventContent {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::user_id;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{IgnoredUserListEvent, IgnoredUserListEventContent};
 | 
			
		||||
 | 
			
		||||
@ -165,7 +165,7 @@ mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use crate::{event_id, serde::Base64, user_id};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{
 | 
			
		||||
        from_value as from_json_value, json, to_value as to_json_value, Value as JsonValue,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,7 @@ impl KeyVerificationDoneEventContent {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::event_id;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::KeyVerificationDoneEventContent;
 | 
			
		||||
 | 
			
		||||
@ -75,7 +75,7 @@ impl KeyVerificationReadyEventContent {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::{event_id, OwnedDeviceId};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{KeyVerificationReadyEventContent, ToDeviceKeyVerificationReadyEventContent};
 | 
			
		||||
 | 
			
		||||
@ -200,7 +200,7 @@ mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use crate::{event_id, serde::Base64, user_id};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{
 | 
			
		||||
        from_value as from_json_value, json, to_value as to_json_value, Value as JsonValue,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -80,8 +80,8 @@ impl StaticEventContent for PresenceEventContent {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::{mxc_uri, presence::PresenceState, user_id};
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{PresenceEvent, PresenceEventContent};
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ impl Relation {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::event_id;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
    use super::{ReactionEventContent, Relation};
 | 
			
		||||
 | 
			
		||||
@ -382,7 +382,7 @@ impl From<JsonWebKeyInit> for JsonWebKey {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde::Deserialize;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -87,7 +87,7 @@ fn default_room_version_id() -> RoomVersionId {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{RoomCreateEventContent, RoomType};
 | 
			
		||||
 | 
			
		||||
@ -313,8 +313,8 @@ impl From<MegolmV1AesSha2ContentInit> for MegolmV1AesSha2Content {
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use crate::{event_id, serde::Raw};
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{
 | 
			
		||||
 | 
			
		||||
@ -238,7 +238,7 @@ impl<'de> Deserialize<'de> for AllowRule {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
 | 
			
		||||
    use super::{AllowRule, JoinRule, OriginalSyncRoomJoinRulesEvent, RoomJoinRulesEventContent};
 | 
			
		||||
    use crate::room_id;
 | 
			
		||||
 | 
			
		||||
@ -458,9 +458,9 @@ impl StrippedRoomMemberEvent {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use maplit::btreemap;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json};
 | 
			
		||||
 | 
			
		||||
    use super::{MembershipState, RoomMemberEventContent, SignedContent, ThirdPartyInvite};
 | 
			
		||||
 | 
			
		||||
@ -30,8 +30,8 @@ impl RoomNameEventContent {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::convert::TryInto;
 | 
			
		||||
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::{int, uint};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::RoomNameEventContent;
 | 
			
		||||
 | 
			
		||||
@ -51,7 +51,7 @@ where
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde::{Deserialize, Serialize};
 | 
			
		||||
    use serde_json::json;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -136,7 +136,7 @@ pub enum SecretName {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod test {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{RequestAction, SecretName, ToDeviceSecretRequestEventContent};
 | 
			
		||||
 | 
			
		||||
@ -96,8 +96,8 @@ pub enum SecretEncryptionAlgorithm {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{PassPhrase, SecretEncryptionAlgorithm, SecretStorageKeyEventContent};
 | 
			
		||||
 | 
			
		||||
@ -44,7 +44,7 @@ pub enum SecretEncryptedData {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use crate::serde::Base64;
 | 
			
		||||
 | 
			
		||||
@ -71,8 +71,8 @@ pub struct HierarchySpaceChildEvent {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{HierarchySpaceChildEvent, SpaceChildEventContent};
 | 
			
		||||
 | 
			
		||||
@ -499,7 +499,7 @@ impl FromStr for MatrixUri {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use ruma_identifiers_validation::{
 | 
			
		||||
        error::{MatrixIdError, MatrixToError, MatrixUriError},
 | 
			
		||||
        Error,
 | 
			
		||||
 | 
			
		||||
@ -474,8 +474,8 @@ impl PushFormat {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::{int, uint};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{
 | 
			
		||||
        from_value as from_json_value, json, to_value as to_json_value,
 | 
			
		||||
        value::RawValue as RawJsonValue, Value as JsonValue,
 | 
			
		||||
 | 
			
		||||
@ -170,7 +170,7 @@ mod tweak_serde {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{Action, Tweak};
 | 
			
		||||
 | 
			
		||||
@ -312,9 +312,9 @@ mod tests {
 | 
			
		||||
    use std::collections::BTreeMap;
 | 
			
		||||
 | 
			
		||||
    use crate::{room_id, serde::Raw, user_id};
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::{int, uint};
 | 
			
		||||
    use maplit::btreemap;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde_json::{
 | 
			
		||||
        from_value as from_json_value, json, to_value as to_json_value, Value as JsonValue,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@ -179,8 +179,8 @@ where
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::{int, Int};
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde::Deserialize;
 | 
			
		||||
 | 
			
		||||
    use super::deserialize_v1_powerlevel;
 | 
			
		||||
 | 
			
		||||
@ -229,7 +229,7 @@ where
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::borrow::Cow;
 | 
			
		||||
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
 | 
			
		||||
    use super::ValOrVec;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -93,8 +93,8 @@ fn f64_to_uint(val: f64) -> UInt {
 | 
			
		||||
mod tests {
 | 
			
		||||
    use std::time::{Duration, UNIX_EPOCH};
 | 
			
		||||
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use serde::{Deserialize, Serialize};
 | 
			
		||||
    use serde_json::json;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use http::Method;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::api::{
 | 
			
		||||
    error::IntoHttpError,
 | 
			
		||||
    select_path,
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
 | 
			
		||||
use std::time::Duration;
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{MessageLikeEvent, StateEvent, SyncMessageLikeEvent, SyncStateEvent},
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use maplit::btreemap;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{event_id, receipt::ReceiptType, room_id, user_id, MilliSecondsSinceUnixEpoch};
 | 
			
		||||
use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use js_int::{uint, UInt};
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id, events::MessageLikeEvent, room_id, user_id, MilliSecondsSinceUnixEpoch,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
#![cfg(feature = "unstable-msc3551")]
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
#![cfg(feature = "unstable-msc3552")]
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
use std::convert::TryFrom;
 | 
			
		||||
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    events::{AnyInitialStateEvent, InitialStateEvent},
 | 
			
		||||
    RoomName,
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
#![cfg(feature = "unstable-msc3488")]
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
 | 
			
		||||
use std::convert::TryFrom;
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::{uint, UInt};
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::room::message::{InReplyTo, MessageType, Relation, RoomMessageEventContent},
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
use std::borrow::Cow;
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
#[cfg(not(feature = "unstable-msc1767"))]
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
#[cfg(not(feature = "unstable-msc1767"))]
 | 
			
		||||
use ruma_common::events::room::message::InReplyTo;
 | 
			
		||||
#[cfg(any(feature = "unstable-msc2676", not(feature = "unstable-msc1767")))]
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::{uint, UInt};
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
 | 
			
		||||
use std::time::Duration;
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
 | 
			
		||||
use std::time::Duration;
 | 
			
		||||
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use assign::assign;
 | 
			
		||||
use js_int::uint;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::{
 | 
			
		||||
    event_id,
 | 
			
		||||
    events::{
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use form_urlencoded::Serializer as Encoder;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::serde::urlencoded;
 | 
			
		||||
use serde::Deserialize;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
use assert_matches::assert_matches;
 | 
			
		||||
use form_urlencoded::Serializer as Encoder;
 | 
			
		||||
use matches::assert_matches;
 | 
			
		||||
use ruma_common::serde::urlencoded::{self, ser::Error};
 | 
			
		||||
use serde::Serialize;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -31,5 +31,5 @@ serde = { version = "1.0.118", features = ["derive"] }
 | 
			
		||||
serde_json = "1.0.61"
 | 
			
		||||
 | 
			
		||||
[dev-dependencies]
 | 
			
		||||
assert_matches = "1.5.0"
 | 
			
		||||
http = "0.2.2"
 | 
			
		||||
matches = "0.1.8"
 | 
			
		||||
 | 
			
		||||
@ -70,7 +70,7 @@ where
 | 
			
		||||
#[cfg(not(feature = "unstable-pre-spec"))]
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use serde_json::{json, to_value as to_json_value};
 | 
			
		||||
 | 
			
		||||
    use super::{deserialize, serialize};
 | 
			
		||||
 | 
			
		||||
@ -318,8 +318,8 @@ impl SigningKeyUpdateContent {
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod test {
 | 
			
		||||
    use assert_matches::assert_matches;
 | 
			
		||||
    use js_int::uint;
 | 
			
		||||
    use matches::assert_matches;
 | 
			
		||||
    use ruma_common::{room_id, user_id};
 | 
			
		||||
    use serde_json::json;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user