Skip to content

Commit 011d5bb

Browse files
committed
iterate over bytes, as we expect only portion of ascii range
1 parent b24126a commit 011d5bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ pub fn demangle(mut s: &str) -> Demangle<'_> {
9595
let llvm = ".llvm.";
9696
if let Some(i) = s.find(llvm) {
9797
let candidate = &s[i + llvm.len()..];
98-
let all_hex = candidate.chars().all(|c| match c {
99-
'A'..='F' | '0'..='9' | '@' => true,
98+
let all_hex = candidate.bytes().all(|c| match c {
99+
b'A'..=b'F' | b'0'..=b'9' | b'@' => true,
100100
_ => false,
101101
});
102102

0 commit comments

Comments
 (0)