aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-03-23 09:59:51 +0000
committerAleksey Kladov <[email protected]>2021-03-23 10:04:43 +0000
commitba48c0d8bd93a0cb5c141f9296843bf5028d960d (patch)
tree12f9ef744af86ab305b66d54968c6d4435d59141
parent521a26b0d207fc6d9293e06ca2c9a669bb66ddc4 (diff)
Align naming of deps and revdeps
-rw-r--r--crates/base_db/src/input.rs5
-rw-r--r--crates/hir/src/lib.rs6
2 files changed, 2 insertions, 9 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs
index 04a338d99..56fb4ad71 100644
--- a/crates/base_db/src/input.rs
+++ b/crates/base_db/src/input.rs
@@ -276,10 +276,7 @@ impl CrateGraph {
276 276
277 /// Returns all transitive reverse dependencies of the given crate, 277 /// Returns all transitive reverse dependencies of the given crate,
278 /// including the crate itself. 278 /// including the crate itself.
279 pub fn transitive_reverse_dependencies( 279 pub fn transitive_rev_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_ {
280 &self,
281 of: CrateId,
282 ) -> impl Iterator<Item = CrateId> + '_ {
283 let mut worklist = vec![of]; 280 let mut worklist = vec![of];
284 let mut rev_deps = FxHashSet::default(); 281 let mut rev_deps = FxHashSet::default();
285 rev_deps.insert(of); 282 rev_deps.insert(of);
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index aefebde06..68f4551c0 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -154,11 +154,7 @@ impl Crate {
154 } 154 }
155 155
156 pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> { 156 pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> {
157 db.crate_graph() 157 db.crate_graph().transitive_rev_deps(self.id).into_iter().map(|id| Crate { id }).collect()
158 .transitive_reverse_dependencies(self.id)
159 .into_iter()
160 .map(|id| Crate { id })
161 .collect()
162 } 158 }
163 159
164 pub fn root_module(self, db: &dyn HirDatabase) -> Module { 160 pub fn root_module(self, db: &dyn HirDatabase) -> Module {