Fix remaining clippy lints (#687)

The eighth (and final) in a series of PRs that aim to get CI passing
This commit is contained in:
Kenneth Loeffler
2023-06-30 11:06:43 -07:00
committed by GitHub
parent 8646b2dfce
commit 67674d53a2
4 changed files with 27 additions and 13 deletions

View File

@@ -219,12 +219,30 @@ fn is_valid_ident_char(value: char) -> bool {
}
fn is_keyword(value: &str) -> bool {
match value {
"and" | "break" | "do" | "else" | "elseif" | "end" | "false" | "for" | "function"
| "if" | "in" | "local" | "nil" | "not" | "or" | "repeat" | "return" | "then" | "true"
| "until" | "while" => true,
_ => false,
}
matches!(
value,
"and"
| "break"
| "do"
| "else"
| "elseif"
| "end"
| "false"
| "for"
| "function"
| "if"
| "in"
| "local"
| "nil"
| "not"
| "or"
| "repeat"
| "return"
| "then"
| "true"
| "until"
| "while"
)
}
/// Tells whether the given string is a valid Lua identifier.