-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark format::Numeric
and format::Fixed
as non_exhaustive
#1409
Comments
Definitely sounds good to me for 0.5. For 0.4, what's the compatibility calculus here? |
That's a new term for me... Two arguments:
|
Okay, and I assume it was a niche/obscure one? Sounds good to me, let's do it (and make sure to note it in the release notes). |
It was chrono_locale, which has 13.252 all-time downloads, not seen an update for 5 years, and only one dependent crate (seemingly a hobby project). |
Yes, that doesn't seem like a blocker. |
One thing that makes improving our parsing and formatting code difficult is that adding new formatting items is a breaking change.
Almost all formatting items live in
format::Numeric
andformat::Fixed
enums within aformat::Item
.User code matching on the these enums within a
format::Item
is very rare. When we did add variants to it in 0.4.23 it broke one abandoned crate (see #899, #1151).format::Pad
could also benefit from becomingnon_exhaustive
, but there is a slightly higher chance people are exhaustively matching on its three variants.For 0.5 we should mark these enums as
non_exhaustive
. And given the low impact of the accidental previous change we may consider it on 0.4.x.The text was updated successfully, but these errors were encountered: