Debian Codegraph @

third_party/rust/framehop/src/display_utils.rs

raw
1 use core::fmt::{Binary, Debug, LowerHex};
2
3 pub struct HexNum<N: LowerHex>(pub N);
4
5 impl<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
11 pub struct BinNum<N: Binary>(pub N);
12
13 impl<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 }