Closed dmarcuse closed 4 years ago
... yikes. I'll have to think about how to deal with this, I must have added those by accident via copy/paste.
On second thought, it should be possible to add a feature flag that disables them, which would be a (technically) backwards-compatible change, right?
No, a crate can enable the feature flag while another crate relies on it not being set. The same problem applies to introducing a new default feature flag that can be disabled.
Oh well - I guess the only option would be to set it aside for the next major release?
I believe so. One hack for now would be to add an inherent method that delegates to Iterator::max
until the next major release.
This will be fixed in the next major release.
EnumSetIter
derives an implementation ofOrd
, which makes it annoying to useIterator::max
due to the conflicting name withOrd::max
. This can be worked around withiter.map(|v| v).max()
, or by manually disambiguating the call withIterator::max(iter)
, but both solutions feel a bit hacky.I cloned and tested a fix for this by removing the
Ord
implementation, and the tests still compile and pass - I'm not sure whyPartialOrd
/Ord
are implemented on an iterator in the first place. Unfortunately, removing theOrd
implementation would be a breaking change according to semantic versioning.