mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 06:33:58 +00:00
manual_find
This commit is contained in:
parent
2a500d5280
commit
60dda08266
2 changed files with 1 additions and 7 deletions
|
@ -182,7 +182,6 @@ get_first = "allow"
|
||||||
if_same_then_else = "allow"
|
if_same_then_else = "allow"
|
||||||
large_enum_variant = "allow"
|
large_enum_variant = "allow"
|
||||||
let_and_return = "allow"
|
let_and_return = "allow"
|
||||||
manual_find = "allow"
|
|
||||||
manual_map = "allow"
|
manual_map = "allow"
|
||||||
map_clone = "allow"
|
map_clone = "allow"
|
||||||
match_like_matches_macro = "allow"
|
match_like_matches_macro = "allow"
|
||||||
|
|
|
@ -764,12 +764,7 @@ impl Iterator for PatternIterator {
|
||||||
type Item = SyntaxElement;
|
type Item = SyntaxElement;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<SyntaxElement> {
|
fn next(&mut self) -> Option<SyntaxElement> {
|
||||||
for element in &mut self.iter {
|
(&mut self.iter).find(|element| !element.kind().is_trivia())
|
||||||
if !element.kind().is_trivia() {
|
|
||||||
return Some(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue