pub fn bytes_to_hex<B>(bytes: B) -> Stringwhere B: AsRef<[u8]>,
This function uses HEX_STRS, which (at the time) was faster than format!("{:02x}", ...).
HEX_STRS
format!("{:02x}", ...)
assert_eq!(zeros::bytes_to_hex( &[202, 254]), "cafe"); assert_eq!(zeros::bytes_to_hex(&[192, 255, 238]), "c0ffee");