Implement Debug for RawPduId.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -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() }
|
||||
|
||||
Reference in New Issue
Block a user