Skip to content

Commit d1ab03c

Browse files
author
lucas.mendes
committed
fix appending attributes instead of inserting them
This fixes a warning (`legacy_derive_helpers`) about outer struct attributes being used before being declared. This warning is slated to become a hard error in the future.
1 parent 66171b7 commit d1ab03c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/imp.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ fn strike_through_attributes(
251251
true
252252
}
253253
});
254-
dec_attrs.extend_from_slice(&strike_attrs[..]);
254+
255+
strike_attrs.iter().for_each(|attr| dec_attrs.insert(0, attr.clone()));
255256
}
256257

257258
fn recurse_through_type_list(

0 commit comments

Comments
 (0)