1 2 3 4 5 6 7 8 9 10 11 12 13
use std::fmt; use hex::ToHex; // This should be in hex crate pub(crate) struct Hex<T>(pub T); impl<T: ToHex> fmt::Display for Hex<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.0.write_hex(f) } }