aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/adt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/adt.rs')
-rw-r--r--crates/ra_hir/src/adt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs
index c6463235c..b700be267 100644
--- a/crates/ra_hir/src/adt.rs
+++ b/crates/ra_hir/src/adt.rs
@@ -42,7 +42,7 @@ pub struct StructData {
42} 42}
43 43
44impl StructData { 44impl StructData {
45 pub(crate) fn new(struct_def: ast::StructDef) -> StructData { 45 pub(crate) fn new(struct_def: &ast::StructDef) -> StructData {
46 let name = struct_def.name().map(|n| n.as_name()); 46 let name = struct_def.name().map(|n| n.as_name());
47 let variant_data = VariantData::new(struct_def.flavor()); 47 let variant_data = VariantData::new(struct_def.flavor());
48 let variant_data = Arc::new(variant_data); 48 let variant_data = Arc::new(variant_data);
@@ -87,7 +87,7 @@ pub struct EnumData {
87} 87}
88 88
89impl EnumData { 89impl EnumData {
90 pub(crate) fn new(enum_def: ast::EnumDef) -> Self { 90 pub(crate) fn new(enum_def: &ast::EnumDef) -> Self {
91 let name = enum_def.name().map(|n| n.as_name()); 91 let name = enum_def.name().map(|n| n.as_name());
92 let variants = if let Some(evl) = enum_def.variant_list() { 92 let variants = if let Some(evl) = enum_def.variant_list() {
93 evl.variants() 93 evl.variants()