chore: preserve array indexer unwrap

This commit is contained in:
Matthew Little
2022-04-19 19:53:15 +02:00
parent e2563fa58e
commit 773026eaeb

View File

@@ -241,9 +241,9 @@ fn c32_decode_ascii(input_str: &str) -> Result<Vec<u8>, Error> {
let mut iter_c32_digits = Vec::<u8>::with_capacity(input_str.len());
for x in input_str.as_bytes().iter().rev() {
match C32_CHARACTERS_MAP[*x as usize] {
Some(x) => iter_c32_digits.push(x),
None => {}
match C32_CHARACTERS_MAP.get(*x as usize) {
Some(&Some(x)) => iter_c32_digits.push(x),
_ => {}
}
}