Hacker News new | ask | show | jobs
by csomar 2378 days ago
I agree. That's what Semver is for. If you are adding new variants to your enum that can break code for your dependents, then increment your version accordingly.
1 comments

Right but some enums are designed to allow new types to be added.

For example suppose you add another image format to the `image` library:

https://docs.rs/image/0.23.0-preview.0/image/enum.ImageForma...

What's more annoying - a major version bump every time you support a new format, or not being able to exhaustively match on all 10 formats?