aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr/src/lib.rs')
-rw-r--r--crates/ra_ssr/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_ssr/src/lib.rs b/crates/ra_ssr/src/lib.rs
index 7b6409806..6d578610b 100644
--- a/crates/ra_ssr/src/lib.rs
+++ b/crates/ra_ssr/src/lib.rs
@@ -4,6 +4,7 @@
4//! based on a template. 4//! based on a template.
5 5
6mod matching; 6mod matching;
7mod nester;
7mod parsing; 8mod parsing;
8mod replacing; 9mod replacing;
9mod search; 10mod search;
@@ -90,8 +91,10 @@ impl<'db> MatchFinder<'db> {
90 /// Returns matches for all added rules. 91 /// Returns matches for all added rules.
91 pub fn matches(&self) -> SsrMatches { 92 pub fn matches(&self) -> SsrMatches {
92 let mut matches = Vec::new(); 93 let mut matches = Vec::new();
93 self.find_all_matches(&mut matches); 94 for rule in &self.rules {
94 SsrMatches { matches } 95 self.find_matches_for_rule(rule, &mut matches);
96 }
97 nester::nest_and_remove_collisions(matches, &self.sema)
95 } 98 }
96 99
97 /// Finds all nodes in `file_id` whose text is exactly equal to `snippet` and attempts to match 100 /// Finds all nodes in `file_id` whose text is exactly equal to `snippet` and attempts to match