]> git.lizzy.rs Git - rust.git/commitdiff
Align naming of deps and revdeps
authorAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 23 Mar 2021 09:59:51 +0000 (12:59 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Tue, 23 Mar 2021 10:04:43 +0000 (13:04 +0300)
crates/base_db/src/input.rs
crates/hir/src/lib.rs

index 04a338d990392a4d21c9f708b1bb5fbcdb21ee71..56fb4ad71148740dd6e3c6832b2011f00b5321ca 100644 (file)
@@ -276,10 +276,7 @@ pub fn transitive_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_
 
     /// Returns all transitive reverse dependencies of the given crate,
     /// including the crate itself.
-    pub fn transitive_reverse_dependencies(
-        &self,
-        of: CrateId,
-    ) -> impl Iterator<Item = CrateId> + '_ {
+    pub fn transitive_rev_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_ {
         let mut worklist = vec![of];
         let mut rev_deps = FxHashSet::default();
         rev_deps.insert(of);
index aefebde06e67995a50548d472f0640b4aeae0abc..68f4551c0cfc7536942cb8d2eab680ab08de7567 100644 (file)
@@ -154,11 +154,7 @@ pub fn reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> {
     }
 
     pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> {
-        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 {