aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 30b96d7e2..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 {
@@ -1572,8 +1568,7 @@ impl Impl {
1572 pub fn all_for_trait(db: &dyn HirDatabase, trait_: Trait) -> Vec<Impl> { 1568 pub fn all_for_trait(db: &dyn HirDatabase, trait_: Trait) -> Vec<Impl> {
1573 let krate = trait_.module(db).krate(); 1569 let krate = trait_.module(db).krate();
1574 let mut all = Vec::new(); 1570 let mut all = Vec::new();
1575 for Crate { id } in krate.transitive_reverse_dependencies(db).into_iter().chain(Some(krate)) 1571 for Crate { id } in krate.transitive_reverse_dependencies(db).into_iter() {
1576 {
1577 let impls = db.trait_impls_in_crate(id); 1572 let impls = db.trait_impls_in_crate(id);
1578 all.extend(impls.for_trait(trait_.id).map(Self::from)) 1573 all.extend(impls.for_trait(trait_.id).map(Self::from))
1579 } 1574 }