Skip to content

Commit 3714800

Browse files
bors[bot]matklad
andcommitted
Merge #802
802: fix obsolete comment r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents db43080 + 6052477 commit 3714800

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ra_hir/src/ty/method_resolution.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ impl Ty {
136136
})
137137
}
138138

139-
// This would be nicer if it just returned an iterator, but that's really
140-
// complicated with all the cancelable operations
139+
// This would be nicer if it just returned an iterator, but that runs into
140+
// lifetime problems, because we need to borrow temp `CrateImplBlocks`.
141141
pub fn iterate_methods<T>(
142142
self,
143143
db: &impl HirDatabase,
@@ -163,7 +163,7 @@ impl Ty {
163163
for item in impl_block.items() {
164164
match item {
165165
ImplItem::Method(f) => {
166-
if let Some(result) = callback(f.clone()) {
166+
if let Some(result) = callback(*f) {
167167
return Some(result);
168168
}
169169
}

0 commit comments

Comments
 (0)