From ae7e55c1dd801c60092205ec8890179e10a47814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 21 Mar 2021 13:13:34 +0100 Subject: clippy::complexity simplifications related to Iterators --- crates/syntax/src/ast/edit.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 80be8b79c..365de4463 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -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 -- cgit v1.2.3