Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 37bb2e1997..df17b75c05 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -175,8 +175,11 @@ impl Crate { .collect() } - pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> { - db.crate_graph().transitive_rev_deps(self.id).into_iter().map(|id| Crate { id }).collect() + pub fn transitive_reverse_dependencies( + self, + db: &dyn HirDatabase, + ) -> impl Iterator<Item = Crate> { + db.crate_graph().transitive_rev_deps(self.id).map(|id| Crate { id }) } pub fn root_module(self, db: &dyn HirDatabase) -> Module { |