Skip to content

Commit

Permalink
fix appending attributes instead of inserting them
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lucas.mendes committed Nov 17, 2022
1 parent 66171b7 commit efa8b2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ fn strike_through_attributes(
true
}
});
dec_attrs.extend_from_slice(&strike_attrs[..]);

strike_attrs.iter().for_each(|attr| dec_attrs.insert(0, attr.clone()));
}

fn recurse_through_type_list(
Expand Down

0 comments on commit efa8b2a

Please sign in to comment.