framehop/
display_utils.rs

1use core::fmt::{Binary, Debug, LowerHex};
2
3pub struct HexNum<N: LowerHex>(pub N);
4
5impl<N: LowerHex> Debug for HexNum<N> {
6    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7        LowerHex::fmt(&self.0, f)
8    }
9}
10
11pub struct BinNum<N: Binary>(pub N);
12
13impl<N: Binary> Debug for BinNum<N> {
14    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15        Binary::fmt(&self.0, f)
16    }
17}