Skip to content

Commit 8a3361c

Browse files
committed
Auto merge of #9110 - klensy:simple-fix, r=alexcrichton
simplify char range check Instead manually checking ranges for char, use std method.
2 parents c3abcfe + dcc9587 commit 8a3361c

File tree

1 file changed

+2
-2
lines changed
  • crates/cargo-platform/src

1 file changed

+2
-2
lines changed

crates/cargo-platform/src/cfg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ impl<'a> Iterator for Tokenizer<'a> {
298298
}
299299

300300
fn is_ident_start(ch: char) -> bool {
301-
ch == '_' || ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')
301+
ch == '_' || ch.is_ascii_alphabetic()
302302
}
303303

304304
fn is_ident_rest(ch: char) -> bool {
305-
is_ident_start(ch) || ('0' <= ch && ch <= '9')
305+
is_ident_start(ch) || ch.is_ascii_digit()
306306
}
307307

308308
impl<'a> Token<'a> {

0 commit comments

Comments
 (0)