diff --git a/crates/ruma-state-res/src/test_utils.rs b/crates/ruma-state-res/src/test_utils.rs index 8a3d4294..0be8489f 100644 --- a/crates/ruma-state-res/src/test_utils.rs +++ b/crates/ruma-state-res/src/test_utils.rs @@ -552,7 +552,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => &ev.room_id, Pdu::RoomV3Pdu(ev) => &ev.room_id, - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -561,7 +561,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => &ev.sender, Pdu::RoomV3Pdu(ev) => &ev.sender, - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -570,7 +570,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => &ev.kind, Pdu::RoomV3Pdu(ev) => &ev.kind, - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -579,7 +579,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => &ev.content, Pdu::RoomV3Pdu(ev) => &ev.content, - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -588,7 +588,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => ev.origin_server_ts, Pdu::RoomV3Pdu(ev) => ev.origin_server_ts, - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -597,7 +597,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => ev.state_key.as_deref(), Pdu::RoomV3Pdu(ev) => ev.state_key.as_deref(), - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -606,7 +606,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => Box::new(ev.prev_events.iter().map(|(id, _)| id)), Pdu::RoomV3Pdu(ev) => Box::new(ev.prev_events.iter()), - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -615,7 +615,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => Box::new(ev.auth_events.iter().map(|(id, _)| id)), Pdu::RoomV3Pdu(ev) => Box::new(ev.auth_events.iter()), - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } } @@ -624,7 +624,7 @@ pub mod event { match &self.rest { Pdu::RoomV1Pdu(ev) => ev.redacts.as_ref(), Pdu::RoomV3Pdu(ev) => ev.redacts.as_ref(), - #[cfg(not(feature = "unstable-exhaustive-types"))] + #[allow(unreachable_patterns)] _ => unreachable!("new PDU version"), } }