Repository navigation
fix(error)!: mark SacnError and ParsePacketError non-exhaustive - #129
Merged
stewartadam merged 2 commits intoNov 29, 2026
Merged
Conversation
New error variants, such as one for a network interface that can't be found, can then be added without a breaking release. Code outside the crate that matches on either enum now needs a wildcard arm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVSfy9eXbfgqTKMEq7P
stewartadam
enabled auto-merge (squash)
November 29, 2026 06:40
stewartadam
disabled auto-merge
November 29, 2026 06:40
stewartadam
enabled auto-merge (squash)
November 29, 2026 06:40
stewartadam
deleted the
claude/project-thread-tpi2pf-error-non-exhaustive
branch
November 29, 2026 06:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marks
SacnErrorandParsePacketError#[non_exhaustive], so new variants can be added later without a breaking release.Why
Adding a variant to either enum is currently a breaking change, because callers may match on them exhaustively. #100 (network interface selection) works around this by reporting an unknown interface as
SacnError::IowithErrorKind::NotFound. Once this merges, #100 can use its ownInterfaceNotFoundvariant instead.Breaking change
Code outside the crate that matches on
SacnErrororParsePacketErrorwithout a wildcard arm stops compiling and needs a_ =>arm. Nothing else changes: no variant is added, removed or renamed. The title is marked!so release-plz bumps the minor version (0.13).AGENTS.mdsaid that adding aSacnErrorvariant needs a breaking release. I updated it.E1.31
No protocol behaviour changes.
Tests
cargo test, Clippy, andcargo docwith-D warningspass locally. The crate's own tests and examples needed no changes, since they only match specific variants or use wildcard arms already.Generated by Claude Code