Skip to content

Commit 649c346

Browse files
committed
legacy: iterate over bytes, not chars
1 parent 22e1cb1 commit 649c346

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/legacy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ impl<'a> fmt::Display for Demangle<'a> {
155155
_ => {
156156
if escape.starts_with('u') {
157157
let digits = &escape[1..];
158-
let all_lower_hex = digits.chars().all(|c| match c {
159-
'0'..='9' | 'a'..='f' => true,
158+
let all_lower_hex = digits.bytes().all(|c| match c {
159+
b'0'..=b'9' | b'a'..=b'f' => true,
160160
_ => false,
161161
});
162162
let c = u32::from_str_radix(digits, 16)

0 commit comments

Comments
 (0)