File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 11# Specify the minimum supported Rust version
2- msrv = " 1.70 "
2+ msrv = " 1.74 "
Original file line number Diff line number Diff line change @@ -519,19 +519,16 @@ impl Item for Enum {
519519 // it makes sense to always prefix Tag with type name in C
520520 let new_tag = format ! ( "{}_Tag" , self . export_name( ) ) ;
521521
522- // Only update the tag if it's different (avoid double-prefixing)
523- if self . tag . as_ref ( ) != Some ( & new_tag) {
524- if self . repr . style == ReprStyle :: Rust {
525- for variant in & mut self . variants {
526- if let VariantBody :: Body { ref mut body, .. } = variant. body {
527- let path = Path :: new ( new_tag. clone ( ) ) ;
528- let generic_path = GenericPath :: new ( path, vec ! [ ] ) ;
529- body. fields [ 0 ] . ty = Type :: Path ( generic_path) ;
530- }
522+ if self . repr . style == ReprStyle :: Rust {
523+ for variant in & mut self . variants {
524+ if let VariantBody :: Body { ref mut body, .. } = variant. body {
525+ let path = Path :: new ( new_tag. clone ( ) ) ;
526+ let generic_path = GenericPath :: new ( path, vec ! [ ] ) ;
527+ body. fields [ 0 ] . ty = Type :: Path ( generic_path) ;
531528 }
532529 }
533- self . tag = Some ( new_tag) ;
534530 }
531+ self . tag = Some ( new_tag) ;
535532 }
536533
537534 for variant in & mut self . variants {
You can’t perform that action at this time.
0 commit comments