frank2 / exe-rs

The PE Executable Library, but for Rust!
GNU General Public License v3.0
71 stars 13 forks source link

Update bitflags to 2 #13

Open russellbanks opened 11 months ago

russellbanks commented 11 months ago

This pull request updates bitflags to major version 2. The major difference that affects this library is that fewer traits are derived so we have to derive them ourselves.

The minimum this library actually needs is #[derive(Copy, Clone, Debug, Eq, PartialEq)] but this could be a breaking change if we derive less than there were previously, so this pull request derives all traits that existed in bitflags 1, as suggested in the release notes:

Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself:

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]