@@ -21,7 +21,7 @@ pub(super) struct Options {
21
21
}
22
22
23
23
#[ cfg_attr( coverage_nightly, coverage( off) ) ]
24
- fn clean_attr ( derive_input : & mut DeriveInput , binrw_input : & Option < Input > ) {
24
+ fn clean_attr ( derive_input : & mut DeriveInput , binrw_input : Option < & Input > ) {
25
25
clean_struct_attrs ( & mut derive_input. attrs ) ;
26
26
27
27
match & mut derive_input. data {
@@ -43,7 +43,7 @@ fn clean_attr(derive_input: &mut DeriveInput, binrw_input: &Option<Input>) {
43
43
}
44
44
45
45
#[ cfg_attr( coverage_nightly, coverage( off) ) ]
46
- fn clean_field_attrs ( input : & Option < Input > , variant_index : usize , fields : & mut syn:: Fields ) {
46
+ fn clean_field_attrs ( input : Option < & Input > , variant_index : usize , fields : & mut syn:: Fields ) {
47
47
if let Some ( input) = input {
48
48
let fields = match fields {
49
49
syn:: Fields :: Named ( fields) => & mut fields. named ,
@@ -128,12 +128,12 @@ pub(super) fn derive_from_input(
128
128
129
129
match & mut derive_input. data {
130
130
syn:: Data :: Struct ( st) => {
131
- clean_field_attrs ( & binrw_input, 0 , & mut st. fields ) ;
131
+ clean_field_attrs ( binrw_input. as_ref ( ) , 0 , & mut st. fields ) ;
132
132
}
133
133
syn:: Data :: Enum ( en) => {
134
134
for ( index, variant) in en. variants . iter_mut ( ) . enumerate ( ) {
135
135
clean_struct_attrs ( & mut variant. attrs ) ;
136
- clean_field_attrs ( & binrw_input, index, & mut variant. fields ) ;
136
+ clean_field_attrs ( binrw_input. as_ref ( ) , index, & mut variant. fields ) ;
137
137
}
138
138
}
139
139
syn:: Data :: Union ( union) => {
0 commit comments