clippy::complexity simplifications related to Iterators

This commit is contained in:
Matthias Krüger 2021-03-21 13:13:34 +01:00
parent bd407a9882
commit ae7e55c1dd
12 changed files with 64 additions and 80 deletions

View file

@ -461,8 +461,7 @@ impl ast::MatchArmList {
let end = if let Some(comma) = start
.siblings_with_tokens(Direction::Next)
.skip(1)
.skip_while(|it| it.kind().is_trivia())
.next()
.find(|it| !it.kind().is_trivia())
.filter(|it| it.kind() == T![,])
{
comma