| 1 | macro_rules! fmt_impl { | 
|---|---|
| 2 | ($tr:ident, $ty:ty) => { | 
| 3 | impl $tr for $ty { | 
| 4 | fn fmt(&self, f: &mut Formatter<'_>) -> Result { | 
| 5 | $tr::fmt(&BytesRef(self.as_ref()), f) | 
| 6 | } | 
| 7 | } | 
| 8 | }; | 
| 9 | } | 
| 10 | |
| 11 | mod debug; | 
| 12 | mod hex; | 
| 13 | |
| 14 | /// `BytesRef` is not a part of public API of bytes crate. | 
| 15 | struct BytesRef<'a>(&'a [u8]); | 
| 16 | 
