From 6b4ec73b7ed2522b837368a11863afb4b432b9a4 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 4 Jul 2019 22:59:28 -0400 Subject: Clippy changes --- crates/ra_hir/src/code_model.rs | 6 +++--- crates/ra_hir/src/ty/infer.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index ed640d7fc..b3a4f4d63 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -240,10 +240,10 @@ impl Module { } pub fn path_to_root(self, db: &impl HirDatabase) -> Vec { - let mut res = vec![self.clone()]; - let mut curr = self.clone(); + let mut res = vec![self]; + let mut curr = self; while let Some(next) = curr.parent(db) { - res.push(next.clone()); + res.push(next); curr = next } res diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 9228dd314..78aa76449 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -529,7 +529,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { match matching_def { Some(_) => { self.write_assoc_resolution(id, item); - return matching_def; + matching_def } None => None, } -- cgit v1.2.3