MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / decode_hex

Function decode_hex

crates/openshell-supervisor-network/src/l7/path.rs:325–332  ·  view source on GitHub ↗
(b: u8)

Source from the content-addressed store, hash-verified

323}
324
325fn decode_hex(b: u8) -> Option<u8> {
326 match b {
327 b'0'..=b'9' => Some(b - b'0'),
328 b'a'..=b'f' => Some(b - b'a' + 10),
329 b'A'..=b'F' => Some(b - b'A' + 10),
330 _ => None,
331 }
332}
333
334fn upper_hex_nibble(n: u8) -> char {
335 match n {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected