Skip to content

Conversation

@tarcieri
Copy link
Member

It had weird semantics: panicking in debug mode if given a u8 other than 0 or 1.

Instead Choice::from_u8_lsb provides an equivalent constructor which never panicks or incorrectly initializes a Choice.

It had weird semantics: panicking in debug mode if given a `u8` other
than `0` or `1`.

Instead `Choice::from_u8_lsb` provides an equivalent constructor which
never panicks or incorrectly initializes a `Choice`.
@tarcieri tarcieri merged commit d1603ab into master Dec 29, 2025
114 checks passed
@tarcieri tarcieri deleted the ctutils/remove-choice-new branch December 29, 2025 21:23
@tarcieri tarcieri mentioned this pull request Dec 29, 2025
tarcieri added a commit that referenced this pull request Dec 29, 2025
### Removed
- `Choice::new` (#1314)
- `(Partial)Eq` impls for `Choice` (#1315)
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