@@ -527,7 +527,7 @@ impl<'a> EV<'a> {
527527impl < ' a > From < & ' a ( EnumeratedValues , Option < EnumPath > ) > for EV < ' a > {
528528 fn from ( value : & ' a ( EnumeratedValues , Option < EnumPath > ) ) -> Self {
529529 match value. 1 . as_ref ( ) {
530- Some ( base) => Self :: Derived ( & value. 0 , & base) ,
530+ Some ( base) => Self :: Derived ( & value. 0 , base) ,
531531 None => Self :: New ( & value. 0 ) ,
532532 }
533533 }
@@ -1148,16 +1148,16 @@ pub fn fields(
11481148 } else if let Some ( EV :: Derived ( _, base) ) = rwenum. write_enum ( ) {
11491149 // If field is in the same register it emits pub use structure from same module.
11501150 if base. register ( ) != fpath. register ( ) {
1151- if rwenum . generate_write_enum ( ) {
1152- // use the same enum structure name
1153- if !writer_enum_derives. contains ( & value_write_ty) {
1154- let base_path = base_syn_path ( base , & fpath , & value_write_ty , config ) ? ;
1155- mod_items . extend ( quote ! {
1156- # [ doc = #description ]
1157- pub use #base_path as #value_write_ty ;
1158- } ) ;
1159- writer_enum_derives . insert ( value_write_ty . clone ( ) ) ;
1160- }
1151+ // use the same enum structure name
1152+ if rwenum . generate_write_enum ( )
1153+ && !writer_enum_derives. contains ( & value_write_ty)
1154+ {
1155+ let base_path = base_syn_path ( base , & fpath , & value_write_ty , config ) ? ;
1156+ mod_items . extend ( quote ! {
1157+ # [ doc = #description ]
1158+ pub use #base_path as #value_write_ty ;
1159+ } ) ;
1160+ writer_enum_derives . insert ( value_write_ty . clone ( ) ) ;
11611161 }
11621162 }
11631163 }
0 commit comments