From dc7e0091f661ac5e7eb79cf03e4f37250821a61c Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Tue, 29 Jun 2021 19:25:48 -0400 Subject: [PATCH] state-res: Make some room_version enums non_exhaustive --- crates/ruma-state-res/src/room_version.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ruma-state-res/src/room_version.rs b/crates/ruma-state-res/src/room_version.rs index 0c7e15bc..7d9dfce8 100644 --- a/crates/ruma-state-res/src/room_version.rs +++ b/crates/ruma-state-res/src/room_version.rs @@ -2,6 +2,8 @@ use ruma_identifiers::RoomVersionId; use crate::{Error, Result}; +#[derive(Debug)] +#[allow(clippy::exhaustive_enums)] pub enum RoomDisposition { /// A room version that has a stable specification. Stable, @@ -10,6 +12,8 @@ pub enum RoomDisposition { Unstable, } +#[derive(Debug)] +#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub enum EventFormatVersion { /// $id:server event id format V1, @@ -19,6 +23,8 @@ pub enum EventFormatVersion { V3, } +#[derive(Debug)] +#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub enum StateResolutionVersion { /// State resolution for rooms at version 1. V1,