diff --git a/src/core/matrix/pdu/raw_id.rs b/src/core/matrix/pdu/raw_id.rs index effb72e4..0fe3d9c7 100644 --- a/src/core/matrix/pdu/raw_id.rs +++ b/src/core/matrix/pdu/raw_id.rs @@ -1,8 +1,10 @@ +use std::fmt; + use arrayvec::ArrayVec; use super::{Count, Id, ShortEventId, ShortId, ShortRoomId}; -#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] +#[derive(Clone, Copy, Eq, Hash, PartialEq)] pub enum RawId { Normal(RawIdNormal), Backfilled(RawIdBackfilled), @@ -61,6 +63,13 @@ impl RawId { } } +impl fmt::Debug for RawId { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let id: Id = (*self).into(); + write!(f, "{id:?}") + } +} + impl AsRef<[u8]> for RawId { #[inline] fn as_ref(&self) -> &[u8] { self.as_bytes() }