802: fix obsolete comment r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-02-12 10:33:17 +00:00
commit 37148000dc

View File

@ -136,8 +136,8 @@ pub fn lookup_method(self, db: &impl HirDatabase, name: &Name) -> Option<Functio
})
}
// This would be nicer if it just returned an iterator, but that's really
// complicated with all the cancelable operations
// This would be nicer if it just returned an iterator, but that runs into
// lifetime problems, because we need to borrow temp `CrateImplBlocks`.
pub fn iterate_methods<T>(
self,
db: &impl HirDatabase,
@ -163,7 +163,7 @@ pub fn iterate_methods<T>(
for item in impl_block.items() {
match item {
ImplItem::Method(f) => {
if let Some(result) = callback(f.clone()) {
if let Some(result) = callback(*f) {
return Some(result);
}
}