@@ -666,7 +666,7 @@ impl<'a> FmtVisitor<'a> {
666
666
let span = mk_sp ( lo, field. span . lo ( ) ) ;
667
667
668
668
let variant_body = match field. data {
669
- ast:: VariantData :: Tuple ( ..) | ast:: VariantData :: Struct ( .. ) => format_struct (
669
+ ast:: VariantData :: Tuple ( ..) | ast:: VariantData :: Struct { .. } => format_struct (
670
670
& context,
671
671
& StructParts :: from_variant ( field, & context) ,
672
672
self . block_indent ,
@@ -1092,7 +1092,7 @@ fn enum_variant_span(variant: &ast::Variant, context: &RewriteContext<'_>) -> Sp
1092
1092
if let Some ( ref anon_const) = variant. disr_expr {
1093
1093
let span_before_consts = variant. span . until ( anon_const. value . span ) ;
1094
1094
let hi = match & variant. data {
1095
- Struct ( .. ) => context
1095
+ Struct { .. } => context
1096
1096
. snippet_provider
1097
1097
. span_after_last ( span_before_consts, "}" ) ,
1098
1098
Tuple ( ..) => context
@@ -1112,12 +1112,12 @@ fn format_struct(
1112
1112
offset : Indent ,
1113
1113
one_line_width : Option < usize > ,
1114
1114
) -> Option < String > {
1115
- match * struct_parts. def {
1115
+ match struct_parts. def {
1116
1116
ast:: VariantData :: Unit ( ..) => format_unit_struct ( context, struct_parts, offset) ,
1117
- ast:: VariantData :: Tuple ( ref fields, _) => {
1117
+ ast:: VariantData :: Tuple ( fields, _) => {
1118
1118
format_tuple_struct ( context, struct_parts, fields, offset)
1119
1119
}
1120
- ast:: VariantData :: Struct ( ref fields, _ ) => {
1120
+ ast:: VariantData :: Struct { fields, .. } => {
1121
1121
format_struct_struct ( context, struct_parts, fields, offset, one_line_width)
1122
1122
}
1123
1123
}
0 commit comments