mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
clippy::complexity simplifications related to Iterators
This commit is contained in:
parent
bd407a9882
commit
ae7e55c1dd
12 changed files with 64 additions and 80 deletions
|
@ -263,11 +263,10 @@ fn extend_list_item(node: &SyntaxNode) -> Option<TextRange> {
|
|||
) -> Option<SyntaxToken> {
|
||||
node.siblings_with_tokens(dir)
|
||||
.skip(1)
|
||||
.skip_while(|node| match node {
|
||||
NodeOrToken::Node(_) => false,
|
||||
NodeOrToken::Token(it) => is_single_line_ws(it),
|
||||
.find(|node| match node {
|
||||
NodeOrToken::Node(_) => true,
|
||||
NodeOrToken::Token(it) => !is_single_line_ws(it),
|
||||
})
|
||||
.next()
|
||||
.and_then(|it| it.into_token())
|
||||
.filter(|node| node.kind() == delimiter_kind)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue