From fa2e6e0bda280004d7dd26b9edb0f9322552701d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 12 Feb 2019 13:29:27 +0300 Subject: fix obsolete comment --- crates/ra_hir/src/ty/method_resolution.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index da7587f01..9eda0092e 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 { }) } - // 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( self, db: &impl HirDatabase, -- cgit v1.2.3 From 60524771fd480887574c42dc735852287d7ee098 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 12 Feb 2019 13:32:34 +0300 Subject: replace clone with copy --- crates/ra_hir/src/ty/method_resolution.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 9eda0092e..b8e911b88 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs @@ -163,7 +163,7 @@ impl Ty { 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); } } -- cgit v1.2.3