File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -727,10 +727,7 @@ impl<'a> Tokenizer<'a> {
727
727
// match binary literal that starts with 0x
728
728
if s == "0" && chars. peek ( ) == Some ( & 'x' ) {
729
729
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 ( ) ) ;
734
731
return Ok ( Some ( Token :: HexStringLiteral ( s2) ) ) ;
735
732
}
736
733
@@ -1077,7 +1074,7 @@ impl<'a> Tokenizer<'a> {
1077
1074
match chars. peek ( ) {
1078
1075
Some ( '$' ) => {
1079
1076
chars. next ( ) ;
1080
- for ( _ , c ) in value. chars ( ) . enumerate ( ) {
1077
+ for c in value. chars ( ) {
1081
1078
let next_char = chars. next ( ) ;
1082
1079
if Some ( c) != next_char {
1083
1080
return self . tokenizer_error (
You can’t perform that action at this time.
0 commit comments