Conversation
Contributor
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary |
RaoulLuque
reviewed
Dec 9, 2025
Member
RaoulLuque
left a comment
There was a problem hiding this comment.
Looks really good, thank you : ) Just two questions 👍
RaoulLuque
reviewed
Dec 9, 2025
RaoulLuque
reviewed
Dec 10, 2025
RaoulLuque
reviewed
Jan 3, 2026
| #[must_use] | ||
| fn from_u16(index: u16) -> Self { | ||
| Self::try_from(index).expect("Cannot create ID: value outside valid range") | ||
| } |
Member
There was a problem hiding this comment.
This is just a question, not blocking or anything. Why do use expect here in the from_ methods instead of returning the according result?
Member
Author
There was a problem hiding this comment.
because we have the TryFrom impl for that! The idea is that you use from_u16 for truly trivial cases you know, and otherwise TryFrom
RaoulLuque
approved these changes
Jan 3, 2026
Member
RaoulLuque
left a comment
There was a problem hiding this comment.
Looks really good. Thanks so much for your work 🦕
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.
creates the new trait layout and a first implementation
BREAKING CHANGE: new traits that replace the old