diff --git a/crates/ruma-common/src/directory.rs b/crates/ruma-common/src/directory.rs index 53f7aa6d..1a94c8bc 100644 --- a/crates/ruma-common/src/directory.rs +++ b/crates/ruma-common/src/directory.rs @@ -66,6 +66,7 @@ pub struct PublicRoomsChunk { /// This struct will not be updated even if additional fields are added to `PublicRoomsChunk` in a /// new (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct PublicRoomsChunkInit { /// The number of members joined to the room. pub num_joined_members: UInt, diff --git a/crates/ruma-common/src/push.rs b/crates/ruma-common/src/push.rs index 956f8d02..ec6304e4 100644 --- a/crates/ruma-common/src/push.rs +++ b/crates/ruma-common/src/push.rs @@ -152,6 +152,7 @@ pub struct SimplePushRule { /// This struct will not be updated even if additional fields are added to `SimplePushRule` in a new /// (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct SimplePushRuleInit { /// Actions to determine if and how a notification is delivered for events matching this rule. pub actions: Vec, @@ -241,6 +242,7 @@ impl ConditionalPushRule { /// This struct will not be updated even if additional fields are added to `ConditionalPushRule` in /// a new (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct ConditionalPushRuleInit { /// Actions to determine if and how a notification is delivered for events matching this rule. pub actions: Vec, @@ -338,6 +340,7 @@ impl PatternedPushRule { /// This struct will not be updated even if additional fields are added to `PatterenedPushRule` in a /// new (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct PatternedPushRuleInit { /// Actions to determine if and how a notification is delivered for events matching this rule. pub actions: Vec, diff --git a/crates/ruma-common/src/push/condition.rs b/crates/ruma-common/src/push/condition.rs index 507e404f..33d3dead 100644 --- a/crates/ruma-common/src/push/condition.rs +++ b/crates/ruma-common/src/push/condition.rs @@ -113,6 +113,7 @@ impl PushCondition { /// The context of the room associated to an event to be able to test all push conditions. #[derive(Clone, Debug)] +#[allow(clippy::exhaustive_structs)] pub struct PushConditionRoomCtx { /// The ID of the room. pub room_id: RoomId, diff --git a/crates/ruma-common/src/push/condition/room_member_count_is.rs b/crates/ruma-common/src/push/condition/room_member_count_is.rs index 770478a1..580b79a2 100644 --- a/crates/ruma-common/src/push/condition/room_member_count_is.rs +++ b/crates/ruma-common/src/push/condition/room_member_count_is.rs @@ -61,6 +61,7 @@ impl Default for ComparisonOperator { /// let greater = RoomMemberCountIs::gt(uint!(3)); /// ``` #[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[allow(clippy::exhaustive_structs)] pub struct RoomMemberCountIs { /// One of `==`, `<`, `>`, `>=`, `<=`, or no prefix. pub prefix: ComparisonOperator, diff --git a/crates/ruma-common/src/thirdparty.rs b/crates/ruma-common/src/thirdparty.rs index 90a8276e..2e516c33 100644 --- a/crates/ruma-common/src/thirdparty.rs +++ b/crates/ruma-common/src/thirdparty.rs @@ -42,6 +42,7 @@ pub struct Protocol { /// This struct will not be updated even if additional fields are added to `Prococol` in a new /// (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct ProtocolInit { /// Fields which may be used to identify a third party user. pub user_fields: Vec, @@ -96,6 +97,7 @@ pub struct ProtocolInstance { /// This struct will not be updated even if additional fields are added to `Prococol` in a new /// (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct ProtocolInstanceInit { /// A human-readable description for the protocol, such as the name. pub desc: String, @@ -150,6 +152,7 @@ pub struct FieldType { /// This struct will not be updated even if additional fields are added to `FieldType` in a new /// (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct FieldTypeInit { /// A regular expression for validation of a field's value. pub regexp: String, @@ -188,6 +191,7 @@ impl Location { /// A third party network user. #[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct User { /// A matrix user ID representing a third party user. pub userid: UserId, @@ -246,6 +250,7 @@ pub struct ThirdPartyIdentifier { /// This struct will not be updated even if additional fields are added to `ThirdPartyIdentifier` /// in a new (non-breaking) release of the Matrix specification. #[derive(Debug)] +#[allow(clippy::exhaustive_structs)] pub struct ThirdPartyIdentifierInit { /// The third party identifier address. pub address: String, diff --git a/crates/ruma-common/src/time.rs b/crates/ruma-common/src/time.rs index e5cd7dad..09a4ce52 100644 --- a/crates/ruma-common/src/time.rs +++ b/crates/ruma-common/src/time.rs @@ -7,6 +7,7 @@ use std::{ /// A timestamp represented as the number of milliseconds since the unix epoch. #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] +#[allow(clippy::exhaustive_structs)] #[serde(transparent)] pub struct MilliSecondsSinceUnixEpoch(pub UInt); @@ -42,6 +43,7 @@ impl MilliSecondsSinceUnixEpoch { /// A timestamp represented as the number of seconds since the unix epoch. #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] +#[allow(clippy::exhaustive_structs)] #[serde(transparent)] pub struct SecondsSinceUnixEpoch(pub UInt);