Skip to content

Commit

Permalink
Follow linter suggestion to use matches!() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Dec 24, 2023
1 parent 0041d13 commit 1bd60c1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4226,19 +4226,19 @@ impl<'a> Parser<'a> {
fn sqlite_untyped_col_helper(&mut self) -> bool {
if dialect_of!(self is SQLiteDialect) {
match self.peek_token().token {
Token::Word(word) => match word.keyword {
Token::Word(word) => matches!(
word.keyword,
Keyword::CONSTRAINT
| Keyword::PRIMARY
| Keyword::NOT
| Keyword::UNIQUE
| Keyword::CHECK
| Keyword::DEFAULT
| Keyword::COLLATE
| Keyword::REFERENCES
| Keyword::GENERATED
| Keyword::AS => true,
_ => false,
},
| Keyword::PRIMARY
| Keyword::NOT
| Keyword::UNIQUE
| Keyword::CHECK
| Keyword::DEFAULT
| Keyword::COLLATE
| Keyword::REFERENCES
| Keyword::GENERATED
| Keyword::AS
),
_ => true, // e.g. comma immediately after column name
}
} else {
Expand Down

0 comments on commit 1bd60c1

Please sign in to comment.