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(
12371237 } )
12381238 . collect ( ) ;
12391239
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+ } ) ;
12411246
12421247 let variants_stmt = {
12431248 let variant_names = variant_names_idents. iter ( ) . map ( |( name, _, _) | name) ;
@@ -1247,11 +1252,6 @@ fn prepare_enum_variant_enum(
12471252 }
12481253 } ;
12491254
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-
12551255 let variant_visitor = Stmts ( deserialize_generated_identifier (
12561256 & variant_names_idents,
12571257 cattrs,
You can’t perform that action at this time.
0 commit comments