aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/method_resolution.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/method_resolution.rs')
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index bc890fe79..10a6e0b10 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -58,7 +58,7 @@ impl CrateImplBlocks {
58 58
59 pub fn lookup_impl_blocks_for_trait<'a>( 59 pub fn lookup_impl_blocks_for_trait<'a>(
60 &'a self, 60 &'a self,
61 tr: &Trait, 61 tr: Trait,
62 ) -> impl Iterator<Item = ImplBlock> + 'a { 62 ) -> impl Iterator<Item = ImplBlock> + 'a {
63 self.impls_by_trait.get(&tr).into_iter().flat_map(|i| i.iter()).map( 63 self.impls_by_trait.get(&tr).into_iter().flat_map(|i| i.iter()).map(
64 move |(module_id, impl_id)| { 64 move |(module_id, impl_id)| {
@@ -68,8 +68,8 @@ impl CrateImplBlocks {
68 ) 68 )
69 } 69 }
70 70
71 fn collect_recursive(&mut self, db: &impl HirDatabase, module: &Module) { 71 fn collect_recursive(&mut self, db: &impl HirDatabase, module: Module) {
72 let module_impl_blocks = db.impls_in_module(module.clone()); 72 let module_impl_blocks = db.impls_in_module(module);
73 73
74 for (impl_id, _) in module_impl_blocks.impls.iter() { 74 for (impl_id, _) in module_impl_blocks.impls.iter() {
75 let impl_block = ImplBlock::from_id(module_impl_blocks.module, impl_id); 75 let impl_block = ImplBlock::from_id(module_impl_blocks.module, impl_id);
@@ -94,7 +94,7 @@ impl CrateImplBlocks {
94 } 94 }
95 95
96 for child in module.children(db) { 96 for child in module.children(db) {
97 self.collect_recursive(db, &child); 97 self.collect_recursive(db, child);
98 } 98 }
99 } 99 }
100 100
@@ -108,7 +108,7 @@ impl CrateImplBlocks {
108 impls_by_trait: FxHashMap::default(), 108 impls_by_trait: FxHashMap::default(),
109 }; 109 };
110 if let Some(module) = krate.root_module(db) { 110 if let Some(module) = krate.root_module(db) {
111 crate_impl_blocks.collect_recursive(db, &module); 111 crate_impl_blocks.collect_recursive(db, module);
112 } 112 }
113 Arc::new(crate_impl_blocks) 113 Arc::new(crate_impl_blocks)
114 } 114 }