mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13: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"
|
||||
large_enum_variant = "allow"
|
||||
let_and_return = "allow"
|
||||
manual_find = "allow"
|
||||
manual_map = "allow"
|
||||
map_clone = "allow"
|
||||
match_like_matches_macro = "allow"
|
||||
|
|
|
@ -764,12 +764,7 @@ impl Iterator for PatternIterator {
|
|||
type Item = SyntaxElement;
|
||||
|
||||
fn next(&mut self) -> Option<SyntaxElement> {
|
||||
for element in &mut self.iter {
|
||||
if !element.kind().is_trivia() {
|
||||
return Some(element);
|
||||
}
|
||||
}
|
||||
None
|
||||
(&mut self.iter).find(|element| !element.kind().is_trivia())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue