state-res: Make some room_version enums non_exhaustive

This commit is contained in:
Devin Ragotzy 2021-06-29 19:25:48 -04:00 committed by Jonas Platte
parent a4e6cc7c42
commit dc7e0091f6
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -2,6 +2,8 @@ use ruma_identifiers::RoomVersionId;
use crate::{Error, Result}; use crate::{Error, Result};
#[derive(Debug)]
#[allow(clippy::exhaustive_enums)]
pub enum RoomDisposition { pub enum RoomDisposition {
/// A room version that has a stable specification. /// A room version that has a stable specification.
Stable, Stable,
@ -10,6 +12,8 @@ pub enum RoomDisposition {
Unstable, Unstable,
} }
#[derive(Debug)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub enum EventFormatVersion { pub enum EventFormatVersion {
/// $id:server event id format /// $id:server event id format
V1, V1,
@ -19,6 +23,8 @@ pub enum EventFormatVersion {
V3, V3,
} }
#[derive(Debug)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub enum StateResolutionVersion { pub enum StateResolutionVersion {
/// State resolution for rooms at version 1. /// State resolution for rooms at version 1.
V1, V1,