aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/from_source.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 28002f740..12399c6ac 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -749,7 +749,7 @@ impl Const {
749 db.const_data(self) 749 db.const_data(self)
750 } 750 }
751 751
752 pub fn name(&self, db: &impl HirDatabase) -> Option<Name> { 752 pub fn name(self, db: &impl HirDatabase) -> Option<Name> {
753 self.data(db).name().cloned() 753 self.data(db).name().cloned()
754 } 754 }
755 755
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs
index c6ad85fc7..f3194595f 100644
--- a/crates/ra_hir/src/from_source.rs
+++ b/crates/ra_hir/src/from_source.rs
@@ -122,7 +122,7 @@ impl FromSource for StructField {
122 .fields() 122 .fields()
123 .into_iter() 123 .into_iter()
124 .flat_map(|it| it.iter()) 124 .flat_map(|it| it.iter())
125 .map(|(id, _)| StructField { parent: variant_def.clone(), id }) 125 .map(|(id, _)| StructField { parent: variant_def, id })
126 .find(|f| f.source(db) == src) 126 .find(|f| f.source(db) == src)
127 } 127 }
128} 128}