Skip to content

Commit 1047c28

Browse files
committed
fix new rust 1.87 cargo clippy warnings
1 parent ae587dc commit 1047c28

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/ast/visitor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ mod visit_mut_tests {
977977
.parse_statement()
978978
.unwrap();
979979

980-
s.visit(visitor);
980+
let flow = s.visit(visitor);
981+
assert_eq!(flow, ControlFlow::Continue(()));
981982
s
982983
}
983984

src/parser/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2558,9 +2558,7 @@ impl<'a> Parser<'a> {
25582558
self.expect_token(&Token::LParen)?;
25592559
let mut trim_where = None;
25602560
if let Token::Word(word) = self.peek_token().token {
2561-
if [Keyword::BOTH, Keyword::LEADING, Keyword::TRAILING]
2562-
.iter()
2563-
.any(|d| word.keyword == *d)
2561+
if [Keyword::BOTH, Keyword::LEADING, Keyword::TRAILING].contains(&word.keyword)
25642562
{
25652563
trim_where = Some(self.parse_trim_where()?);
25662564
}

0 commit comments

Comments
 (0)