refactor: mark public enums as non-exhaustive to improve API stability

Apply the #[non-exhaustive] attribute to ClientError and WarningKind to prevent breaking changes when adding new variants. Handle the catch-all case in the CLI formatter.
This commit is contained in:
Nils Andreas Svee committed 2026-05-11 12:33:40 +07:00
1 parent 8d1d0f50de
commit 21bc7805f7
3 files changed
+3

No files matched your search

+1
View File
@@ -831,6 +831,7 @@ fn warning_kind(kind: WarningKind) -> &'static str {
WarningKind::MalformedOrUnrelatedPacket => "malformed_or_unrelated_packet",
WarningKind::WrongToken => "wrong_token",
WarningKind::UntrackedReply => "untracked_reply",
_ => "unknown",
}
}