MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / hex_value

Function hex_value

packages/server/src/devtools.rs:1222–1229  ·  view source on GitHub ↗
(byte: u8)

Source from the content-addressed store, hash-verified

1220}
1221
1222fn hex_value(byte: u8) -> Option<u8> {
1223 match byte {
1224 b'0'..=b'9' => Some(byte - b'0'),
1225 b'a'..=b'f' => Some(byte - b'a' + 10),
1226 b'A'..=b'F' => Some(byte - b'A' + 10),
1227 _ => None,
1228 }
1229}
1230
1231fn unique_strings(values: Vec<String>) -> Vec<String> {
1232 values.into_iter().fold(Vec::new(), |mut unique, value| {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected