Peternator7 / strum

A small rust library for adding custom derives to enums
https://crates.io/crates/strum
MIT License
1.81k stars 152 forks source link

Fix EnumCount with disabled variants #268

Closed schultetwin1 closed 1 year ago

schultetwin1 commented 1 year ago

Do not include disabled variants in the count with EnumCount. Fixes #267

Peternator7 commented 1 year ago

Thanks for the PR! I'm in favor of this change, but it's a breaking change so I just need to figure out what release to bundle it into.

schultetwin1 commented 1 year ago

Not a problem! Sounds good!

schultetwin1 commented 1 year ago

Thanks for the PR! I'm in favor of this change, but it's a breaking change so I just need to figure out what release to bundle it into.

I added a feature flag to make this no longer a breaking change. Are you open to using a feature flag here? Whenever we want to make this breaking change in the future, we can just enable the feature by default?

Peternator7 commented 1 year ago

Thanks for continuing to think about this. Let's actually remove the feature flag and I'm going to put a couple of breaking changes into 0.25.

schultetwin1 commented 1 year ago

Thanks for continuing to think about this. Let's actually remove the feature flag and I'm going to put a couple of breaking changes into 0.25.

Sounds good! Done!

Peternator7 commented 1 year ago

Just release 0.25.0 which has this upgrade! Thanks for putting the work in :)

schultetwin1 commented 1 year ago

Amazing, thank you!!