Skip to content

Conversation

@tarcieri
Copy link
Member

It panics if given a value which isn't 0 or 1.

Instead we can use Choice::from_u8_lsb for clear, non-panicking semantics instead.

It panics if given a value which isn't `0` or `1`.

Instead we can use `Choice::from_u8_lsb` for clear, non-panicking
semantics instead.
@tarcieri tarcieri merged commit 90936dc into master Dec 29, 2025
13 checks passed
@tarcieri tarcieri deleted the ctutils/deprecate-choice-new branch December 29, 2025 17:36
@tarcieri tarcieri mentioned this pull request Dec 29, 2025
tarcieri added a commit that referenced this pull request Dec 29, 2025
### Added
- Impl `From<u8>` for `Choice` (#1309)
- `Choice::from_u8*` and `from_u16*` (#1311)

### Changed
- Deprecate `Choice::new` (#1312)
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