Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.toml1
-rw-r--r--crates/ide-ssr/src/matching.rs7
2 files changed, 1 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml
index a4128e7789..847ad08131 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/crates/ide-ssr/src/matching.rs b/crates/ide-ssr/src/matching.rs
index 66cb14451f..3e6b2d4dd9 100644
--- a/crates/ide-ssr/src/matching.rs
+++ b/crates/ide-ssr/src/matching.rs
@@ -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())
}
}