Implement Debug for RawPduId.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
80015a6a30
commit
3593b8ebf7
1 changed files with 10 additions and 1 deletions
|
|
@ -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() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue