fix new rust 1.87 cargo clippy warnings (#1856)

This commit is contained in:
Ophir LOJKINE 2025-05-19 13:09:00 +02:00 committed by GitHub
parent ae587dcbec
commit e7bf186e44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 10 deletions

View file

@ -2558,10 +2558,7 @@ impl<'a> Parser<'a> {
self.expect_token(&Token::LParen)?;
let mut trim_where = None;
if let Token::Word(word) = self.peek_token().token {
if [Keyword::BOTH, Keyword::LEADING, Keyword::TRAILING]
.iter()
.any(|d| word.keyword == *d)
{
if [Keyword::BOTH, Keyword::LEADING, Keyword::TRAILING].contains(&word.keyword) {
trim_where = Some(self.parse_trim_where()?);
}
}