From ba48c0d8bd93a0cb5c141f9296843bf5028d960d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Mar 2021 12:59:51 +0300 Subject: Align naming of deps and revdeps --- crates/base_db/src/input.rs | 5 +---- crates/hir/src/lib.rs | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'crates') 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 { /// Returns all transitive reverse dependencies of the given crate, /// including the crate itself. - pub fn transitive_reverse_dependencies( - &self, - of: CrateId, - ) -> impl Iterator + '_ { + pub fn transitive_rev_deps(&self, of: CrateId) -> impl Iterator + '_ { let mut worklist = vec![of]; let mut rev_deps = FxHashSet::default(); 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 { } pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec { - db.crate_graph() - .transitive_reverse_dependencies(self.id) - .into_iter() - .map(|id| Crate { id }) - .collect() + db.crate_graph().transitive_rev_deps(self.id).into_iter().map(|id| Crate { id }).collect() } pub fn root_module(self, db: &dyn HirDatabase) -> Module { -- cgit v1.2.3