diff options
author | Matthias Krüger <[email protected]> | 2021-03-21 12:13:34 +0000 |
---|---|---|
committer | Matthias Krüger <[email protected]> | 2021-03-21 12:13:34 +0000 |
commit | ae7e55c1dd801c60092205ec8890179e10a47814 (patch) | |
tree | 7e55e7a0c144610d55509b3e28bde0edf0953e39 /crates/ide | |
parent | bd407a9882250cbbb0897faba08e7d5ef80a4862 (diff) |
clippy::complexity simplifications related to Iterators
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/extend_selection.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide/src/extend_selection.rs b/crates/ide/src/extend_selection.rs index e187243cb..5201ce587 100644 --- a/crates/ide/src/extend_selection.rs +++ b/crates/ide/src/extend_selection.rs | |||
@@ -263,11 +263,10 @@ fn extend_list_item(node: &SyntaxNode) -> Option<TextRange> { | |||
263 | ) -> Option<SyntaxToken> { | 263 | ) -> Option<SyntaxToken> { |
264 | node.siblings_with_tokens(dir) | 264 | node.siblings_with_tokens(dir) |
265 | .skip(1) | 265 | .skip(1) |
266 | .skip_while(|node| match node { | 266 | .find(|node| match node { |
267 | NodeOrToken::Node(_) => false, | 267 | NodeOrToken::Node(_) => true, |
268 | NodeOrToken::Token(it) => is_single_line_ws(it), | 268 | NodeOrToken::Token(it) => !is_single_line_ws(it), |
269 | }) | 269 | }) |
270 | .next() | ||
271 | .and_then(|it| it.into_token()) | 270 | .and_then(|it| it.into_token()) |
272 | .filter(|node| node.kind() == delimiter_kind) | 271 | .filter(|node| node.kind() == delimiter_kind) |
273 | } | 272 | } |