aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index da7587f01..b8e911b88 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -136,8 +136,8 @@ impl Ty {
136 }) 136 })
137 } 137 }
138 138
139 // This would be nicer if it just returned an iterator, but that's really 139 // This would be nicer if it just returned an iterator, but that runs into
140 // complicated with all the cancelable operations 140 // lifetime problems, because we need to borrow temp `CrateImplBlocks`.
141 pub fn iterate_methods<T>( 141 pub fn iterate_methods<T>(
142 self, 142 self,
143 db: &impl HirDatabase, 143 db: &impl HirDatabase,
@@ -163,7 +163,7 @@ impl Ty {
163 for item in impl_block.items() { 163 for item in impl_block.items() {
164 match item { 164 match item {
165 ImplItem::Method(f) => { 165 ImplItem::Method(f) => {
166 if let Some(result) = callback(f.clone()) { 166 if let Some(result) = callback(*f) {
167 return Some(result); 167 return Some(result);
168 } 168 }
169 } 169 }