(n: u8)
| 332 | } |
| 333 | |
| 334 | fn upper_hex_nibble(n: u8) -> char { |
| 335 | match n { |
| 336 | 0..=9 => (b'0' + n) as char, |
| 337 | 10..=15 => (b'A' + (n - 10)) as char, |
| 338 | _ => unreachable!("nibble out of range"), |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | // --------------------------------------------------------------------------- |
| 343 | // Tests |
no outgoing calls
no test coverage detected