Skip to content

Commit ccf8cb3

Browse files
committed
v0: one+ more chars to bytes convert, is thats all?
1 parent 5380a80 commit ccf8cb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v0.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ impl<'a, 'b, 's> Printer<'a, 'b, 's> {
10881088
}
10891089

10901090
let mut v = 0;
1091-
for c in hex.chars() {
1092-
v = (v << 4) | (c.to_digit(16).unwrap() as u32);
1091+
for c in hex.bytes() {
1092+
v = (v << 4) | ((c as char).to_digit(16).unwrap() as u32);
10931093
}
10941094
if let Some(c) = char::from_u32(v) {
10951095
write!(self.out, "{:?}", c)

0 commit comments

Comments
 (0)