diff options
author | Jeremy Kolb <[email protected]> | 2019-07-05 03:59:28 +0100 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2019-07-05 04:00:00 +0100 |
commit | 6b4ec73b7ed2522b837368a11863afb4b432b9a4 (patch) | |
tree | 3df753fe58ec1c3fccb48cc2c889fff36e360f33 /crates/ra_hir/src | |
parent | 21f70a7293e7b24dedeec9a504763a1a3ef57675 (diff) |
Clippy changes
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 2 |
2 files changed, 4 insertions, 4 deletions
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 { | |||
240 | } | 240 | } |
241 | 241 | ||
242 | pub fn path_to_root(self, db: &impl HirDatabase) -> Vec<Module> { | 242 | pub fn path_to_root(self, db: &impl HirDatabase) -> Vec<Module> { |
243 | let mut res = vec![self.clone()]; | 243 | let mut res = vec![self]; |
244 | let mut curr = self.clone(); | 244 | let mut curr = self; |
245 | while let Some(next) = curr.parent(db) { | 245 | while let Some(next) = curr.parent(db) { |
246 | res.push(next.clone()); | 246 | res.push(next); |
247 | curr = next | 247 | curr = next |
248 | } | 248 | } |
249 | res | 249 | 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> { | |||
529 | match matching_def { | 529 | match matching_def { |
530 | Some(_) => { | 530 | Some(_) => { |
531 | self.write_assoc_resolution(id, item); | 531 | self.write_assoc_resolution(id, item); |
532 | return matching_def; | 532 | matching_def |
533 | } | 533 | } |
534 | None => None, | 534 | None => None, |
535 | } | 535 | } |