File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1237,7 +1237,12 @@ fn prepare_enum_variant_enum(
1237
1237
} )
1238
1238
. collect ( ) ;
1239
1239
1240
- let other_idx = deserialized_variants. position ( |( _, variant) | variant. attrs . other ( ) ) ;
1240
+ let fallthrough = deserialized_variants
1241
+ . position ( |( _, variant) | variant. attrs . other ( ) )
1242
+ . map ( |other_idx| {
1243
+ let ignore_variant = variant_names_idents[ other_idx] . 1 . clone ( ) ;
1244
+ quote ! ( _serde:: __private:: Ok ( __Field:: #ignore_variant) )
1245
+ } ) ;
1241
1246
1242
1247
let variants_stmt = {
1243
1248
let variant_names = variant_names_idents. iter ( ) . map ( |( name, _, _) | name) ;
@@ -1247,11 +1252,6 @@ fn prepare_enum_variant_enum(
1247
1252
}
1248
1253
} ;
1249
1254
1250
- let fallthrough = other_idx. map ( |other_idx| {
1251
- let ignore_variant = variant_names_idents[ other_idx] . 1 . clone ( ) ;
1252
- quote ! ( _serde:: __private:: Ok ( __Field:: #ignore_variant) )
1253
- } ) ;
1254
-
1255
1255
let variant_visitor = Stmts ( deserialize_generated_identifier (
1256
1256
& variant_names_idents,
1257
1257
cattrs,
You can’t perform that action at this time.
0 commit comments