diff --git a/src/lib.rs b/src/lib.rs index dc3f8bb4..365b0fa3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,12 +79,24 @@ impl Into for Id { } } +impl Into for Id { + fn into(self) -> usize { + self.0 as usize + } +} + impl Into for &Id { fn into(self) -> u32 { self.0 } } +impl Into for &Id { + fn into(self) -> usize { + self.0 as usize + } +} + impl std::fmt::Debug for Id { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.0)