aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs6
-rw-r--r--crates/ra_hir/src/ty/infer.rs2
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 }