Skip to content

feat!: new trait layout#927

Merged
indietyp merged 11 commits intomasterfrom
bm/trait-definitions
Jan 4, 2026
Merged

feat!: new trait layout#927
indietyp merged 11 commits intomasterfrom
bm/trait-definitions

Conversation

@indietyp
Copy link
Member

@indietyp indietyp commented Dec 8, 2025

creates the new trait layout and a first implementation

BREAKING CHANGE: new traits that replace the old

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

This PR contains breaking changes to the public Rust API.

cargo-semver-checks summary

Copy link
Member

@RaoulLuque RaoulLuque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, thank you : ) Just two questions 👍

@indietyp indietyp marked this pull request as ready for review December 30, 2025 15:11
#[must_use]
fn from_u16(index: u16) -> Self {
Self::try_from(index).expect("Cannot create ID: value outside valid range")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a question, not blocking or anything. Why do use expect here in the from_ methods instead of returning the according result?

Copy link
Member Author

@indietyp indietyp Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@RaoulLuque RaoulLuque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good. Thanks so much for your work 🦕

@indietyp indietyp added this pull request to the merge queue Jan 4, 2026
Merged via the queue into master with commit 632f03e Jan 4, 2026
8 checks passed
@indietyp indietyp deleted the bm/trait-definitions branch January 4, 2026 14:29
@github-actions github-actions bot mentioned this pull request Jan 4, 2026
@RaoulLuque RaoulLuque mentioned this pull request Jan 6, 2026
16 tasks
@github-actions github-actions bot mentioned this pull request Feb 7, 2026
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