MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / format_bytes

Function format_bytes

atomic-repository/src/repository/equivalence.rs:750–758  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

748}
749
750fn 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}

Callers 1

compare_worktree_intoFunction · 0.70

Calls 2

lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected