diff options
author | Aleksey Kladov <[email protected]> | 2020-08-13 15:39:16 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-13 15:39:16 +0100 |
commit | bb5c189b7dae1ea63ccd5d7a0c2e097d7c676f77 (patch) | |
tree | 62db93464dbd9ea154a8cb579a576202d97c01cc /crates/ra_ssr/src/nester.rs | |
parent | ae71a631fd657368e8593feb5e025d23147afe60 (diff) |
Rename ra_ide_db -> ide_db
Diffstat (limited to 'crates/ra_ssr/src/nester.rs')
-rw-r--r-- | crates/ra_ssr/src/nester.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_ssr/src/nester.rs b/crates/ra_ssr/src/nester.rs index 8be570d3c..6ac355dfc 100644 --- a/crates/ra_ssr/src/nester.rs +++ b/crates/ra_ssr/src/nester.rs | |||
@@ -13,7 +13,7 @@ use syntax::SyntaxNode; | |||
13 | 13 | ||
14 | pub(crate) fn nest_and_remove_collisions( | 14 | pub(crate) fn nest_and_remove_collisions( |
15 | mut matches: Vec<Match>, | 15 | mut matches: Vec<Match>, |
16 | sema: &hir::Semantics<ra_ide_db::RootDatabase>, | 16 | sema: &hir::Semantics<ide_db::RootDatabase>, |
17 | ) -> SsrMatches { | 17 | ) -> SsrMatches { |
18 | // We sort the matches by depth then by rule index. Sorting by depth means that by the time we | 18 | // We sort the matches by depth then by rule index. Sorting by depth means that by the time we |
19 | // see a match, any parent matches or conflicting matches will have already been seen. Sorting | 19 | // see a match, any parent matches or conflicting matches will have already been seen. Sorting |
@@ -36,7 +36,7 @@ impl MatchCollector { | |||
36 | /// Attempts to add `m` to matches. If it conflicts with an existing match, it is discarded. If | 36 | /// Attempts to add `m` to matches. If it conflicts with an existing match, it is discarded. If |
37 | /// it is entirely within the a placeholder of an existing match, then it is added as a child | 37 | /// it is entirely within the a placeholder of an existing match, then it is added as a child |
38 | /// match of the existing match. | 38 | /// match of the existing match. |
39 | fn add_match(&mut self, m: Match, sema: &hir::Semantics<ra_ide_db::RootDatabase>) { | 39 | fn add_match(&mut self, m: Match, sema: &hir::Semantics<ide_db::RootDatabase>) { |
40 | let matched_node = m.matched_node.clone(); | 40 | let matched_node = m.matched_node.clone(); |
41 | if let Some(existing) = self.matches_by_node.get_mut(&matched_node) { | 41 | if let Some(existing) = self.matches_by_node.get_mut(&matched_node) { |
42 | try_add_sub_match(m, existing, sema); | 42 | try_add_sub_match(m, existing, sema); |
@@ -53,11 +53,7 @@ impl MatchCollector { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /// Attempts to add `m` as a sub-match of `existing`. | 55 | /// Attempts to add `m` as a sub-match of `existing`. |
56 | fn try_add_sub_match( | 56 | fn try_add_sub_match(m: Match, existing: &mut Match, sema: &hir::Semantics<ide_db::RootDatabase>) { |
57 | m: Match, | ||
58 | existing: &mut Match, | ||
59 | sema: &hir::Semantics<ra_ide_db::RootDatabase>, | ||
60 | ) { | ||
61 | for p in existing.placeholder_values.values_mut() { | 57 | for p in existing.placeholder_values.values_mut() { |
62 | // Note, no need to check if p.range.file is equal to m.range.file, since we | 58 | // Note, no need to check if p.range.file is equal to m.range.file, since we |
63 | // already know we're within `existing`. | 59 | // already know we're within `existing`. |