a bit more usize::from
This commit is contained in:
parent
4d0f7e2f39
commit
76c9947024
@ -17,7 +17,9 @@
|
||||
b'"' => ([b'\\', b'"', 0, 0], 2),
|
||||
b'\x20'..=b'\x7e' => ([byte, 0, 0, 0], 1),
|
||||
_ => {
|
||||
([b'\\', b'x', HEX_DIGITS[(byte >> 4) as usize], HEX_DIGITS[(byte & 0xf) as usize]], 4)
|
||||
let hi = HEX_DIGITS[usize::from(byte >> 4)];
|
||||
let lo = HEX_DIGITS[usize::from(byte & 0xf)];
|
||||
([b'\\', b'x', hi, lo], 4)
|
||||
}
|
||||
};
|
||||
*output = data;
|
||||
|
Loading…
Reference in New Issue
Block a user