(string: &[u8], pos: usize)
| 23 | } |
| 24 | |
| 25 | const fn next_byte(string: &[u8], pos: usize) -> Option<(u8, usize)> { |
| 26 | let (half1, pos) = match next_hex_char(string, pos) { |
| 27 | Some(v) => v, |
| 28 | None => return None, |
| 29 | }; |
| 30 | let (half2, pos) = match next_hex_char(string, pos) { |
| 31 | Some(v) => v, |
| 32 | None => panic!("Odd number of hex characters"), |
| 33 | }; |
| 34 | Some(((half1 << 4) + half2, pos)) |
| 35 | } |
| 36 | |
| 37 | /// Compute length of a byte array which will be decoded from the strings. |
| 38 | /// |
no test coverage detected