diff options
Diffstat (limited to 'crates/ra_hir/src/adt.rs')
-rw-r--r-- | crates/ra_hir/src/adt.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs index 9c0c8fdd0..5a3ea5f55 100644 --- a/crates/ra_hir/src/adt.rs +++ b/crates/ra_hir/src/adt.rs | |||
@@ -34,8 +34,8 @@ impl AdtDef { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | impl Struct { | 36 | impl Struct { |
37 | pub(crate) fn variant_data(&self, db: &impl DefDatabase) -> Arc<VariantData> { | 37 | pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { |
38 | db.struct_data(*self).variant_data.clone() | 38 | db.struct_data(self).variant_data.clone() |
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 | ||
@@ -69,7 +69,7 @@ fn variants(enum_def: &ast::EnumDef) -> impl Iterator<Item = &ast::EnumVariant> | |||
69 | 69 | ||
70 | impl EnumVariant { | 70 | impl EnumVariant { |
71 | pub(crate) fn source_impl( | 71 | pub(crate) fn source_impl( |
72 | &self, | 72 | self, |
73 | db: &(impl DefDatabase + AstDatabase), | 73 | db: &(impl DefDatabase + AstDatabase), |
74 | ) -> Source<TreeArc<ast::EnumVariant>> { | 74 | ) -> Source<TreeArc<ast::EnumVariant>> { |
75 | let src = self.parent.source(db); | 75 | let src = self.parent.source(db); |
@@ -81,7 +81,7 @@ impl EnumVariant { | |||
81 | .to_owned(); | 81 | .to_owned(); |
82 | Source { file_id: src.file_id, ast } | 82 | Source { file_id: src.file_id, ast } |
83 | } | 83 | } |
84 | pub(crate) fn variant_data(&self, db: &impl DefDatabase) -> Arc<VariantData> { | 84 | pub(crate) fn variant_data(self, db: &impl DefDatabase) -> Arc<VariantData> { |
85 | db.enum_data(self.parent).variants[self.id].variant_data.clone() | 85 | db.enum_data(self.parent).variants[self.id].variant_data.clone() |
86 | } | 86 | } |
87 | } | 87 | } |