macro_rules! hexstr { ($array:expr) => { ... }; }
Expand description
More compactly format byte arrays and slices as hexadecimals.
use delog::hexstr;
let four_bytes = &[7u8, 0xA1, 255, 0xC7];
assert_eq!(format!("{}", hexstr!(four_bytes)), "07A1FFC7");
assert_eq!(format!("{:x}", hexstr!(four_bytes)), "07a1ffc7");