From 4febe453643521aeee2cb30a0ffc7115992d0740 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 16 Jan 2023 10:51:07 +0100 Subject: [PATCH] refactor(base): Make AmbiguityChange(s) non-exhaustive They are meant to be consumed, but not created, by other crates. --- crates/matrix-sdk-base/src/deserialized_responses.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/matrix-sdk-base/src/deserialized_responses.rs b/crates/matrix-sdk-base/src/deserialized_responses.rs index d575792ac..87e6360db 100644 --- a/crates/matrix-sdk-base/src/deserialized_responses.rs +++ b/crates/matrix-sdk-base/src/deserialized_responses.rs @@ -30,6 +30,7 @@ use serde::{Deserialize, Serialize}; /// A change in ambiguity of room members that an `m.room.member` event /// triggers. #[derive(Clone, Debug, Default)] +#[non_exhaustive] pub struct AmbiguityChange { /// Is the member that is contained in the state key of the `m.room.member` /// event itself ambiguous because of the event. @@ -42,6 +43,7 @@ pub struct AmbiguityChange { /// Collection of ambiguioty changes that room member events trigger. #[derive(Clone, Debug, Default)] +#[non_exhaustive] pub struct AmbiguityChanges { /// A map from room id to a map of an event id to the `AmbiguityChange` that /// the event with the given id caused.