Skip to content

feat!: mark the public enums that can grow non_exhaustive - #75

Merged
crenshawdev merged 1 commit into
crenshawdev:mainfrom
nwxnw:feat/non-exhaustive-enums
Nov 4, 2026
Merged

crenshawdev merged 1 commit into
crenshawdev:mainfrom
nwxnw:feat/non-exhaustive-enums

Conversation

@nwxnw

@nwxnw nwxnw commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The first item in #33: #[non_exhaustive] on Error, NetworkKind, ParseKind, Region, AlertSeverity, WeatherCondition and the AQI enums. I added AqiStandard to the AQI group since a new scale would be a new variant there and in AqiCategory together.

This is breaking for any consumer that matches exhaustively; a single _ arm fixes it, nested AQI patterns included (checked against a scratch crate using Whether's matches). Nothing inside the crate changes, and the wire shape is untouched. API.md's intro now says which enums need the _ arm.

I left NetworkEvent and SleepEvent alone since #33 doesn't list them, but each has one variant and an obvious second (disconnected, suspending), so they're worth marking now if you'd like. Happy to add them here.

Refs #33.

@crenshawdev
crenshawdev merged commit f67953f into crenshawdev:main Nov 4, 2026
3 checks passed
@nwxnw
nwxnw deleted the feat/non-exhaustive-enums branch November 4, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants