(bytes: &[u8])
| 748 | } |
| 749 | |
| 750 | fn format_bytes(bytes: &[u8]) -> String { |
| 751 | const HEX: &[u8; 16] = b"0123456789abcdef"; |
| 752 | let mut output = String::with_capacity(bytes.len() * 2); |
| 753 | for byte in bytes { |
| 754 | output.push(char::from(HEX[usize::from(byte >> 4)])); |
| 755 | output.push(char::from(HEX[usize::from(byte & 0x0f)])); |
| 756 | } |
| 757 | output |
| 758 | } |
no test coverage detected