(c: u8)
| 71 | |
| 72 | #[inline] |
| 73 | fn hex_nibble(c: u8) -> Option<u8> { |
| 74 | match c { |
| 75 | b'0'..=b'9' => Some(c - b'0'), |
| 76 | b'a'..=b'f' => Some(c - b'a' + 10), |
| 77 | b'A'..=b'F' => Some(c - b'A' + 10), |
| 78 | _ => None, |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | /// Decodes a hex-encoded byte slice into binary data. |
| 83 | /// Returns `true` if decoding succeeded, `false` if the input contains invalid hex characters. |
no outgoing calls
no test coverage detected
searching dependent graphs…