Skip to content

Commit 593fc5e

Browse files
committedDec 30, 2023
Fix clippy issues
1 parent 91fb5da commit 593fc5e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎src/tokenizer.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,7 @@ impl<'a> Tokenizer<'a> {
727727
// match binary literal that starts with 0x
728728
if s == "0" && chars.peek() == Some(&'x') {
729729
chars.next();
730-
let s2 = peeking_take_while(
731-
chars,
732-
|ch| matches!(ch, '0'..='9' | 'A'..='F' | 'a'..='f'),
733-
);
730+
let s2 = peeking_take_while(chars, |ch| ch.is_ascii_digit());
734731
return Ok(Some(Token::HexStringLiteral(s2)));
735732
}
736733

@@ -1077,7 +1074,7 @@ impl<'a> Tokenizer<'a> {
10771074
match chars.peek() {
10781075
Some('$') => {
10791076
chars.next();
1080-
for (_, c) in value.chars().enumerate() {
1077+
for c in value.chars() {
10811078
let next_char = chars.next();
10821079
if Some(c) != next_char {
10831080
return self.tokenizer_error(

0 commit comments

Comments
 (0)
Please sign in to comment.