is_lowercase implies is_alphabetic I think

This commit is contained in:
Richard Feldman 2019-09-20 00:11:33 -04:00
parent 3244330a5d
commit 8fe4c749a2

View file

@ -335,7 +335,7 @@ pub fn unqualified_ident<'a>() -> impl Parser<'a, &'a str> {
// Idents must start with a lowercase letter.
let first_letter = match chars.next() {
Some(ch) => {
if ch.is_alphabetic() && ch.is_lowercase() {
if ch.is_lowercase() {
ch
} else {
return Err(unexpected(ch, 0, state, Attempting::RecordFieldLabel));