Skip to content

Conversation

@tarcieri
Copy link
Member

Gives u128 feature parity with u32 and u64 for Choice constructors by adding the following:

  • from_u128_eq
  • from_u128_lt
  • from_u128_nonzero

This also cleans up the implementation by extracting some internal macros (bitle!, bitlt!, bitnz!`) to write comparison predicates.

Gives `u128` feature parity with `u32` and `u64` for `Choice`
constructors by adding the following:

- `from_u128_eq`
- `from_u128_lt`
- `from_u128_nonzero`

This also cleans up the implementation by extracting some internal
macros (`bitle!`, `bitlt`!`, `bitnz!`) to write comparison predicates.
@tarcieri tarcieri merged commit 170c956 into master Dec 27, 2025
13 checks passed
@tarcieri tarcieri deleted the ctutils/choice-u128-constructors branch December 27, 2025 14:52
@tarcieri tarcieri mentioned this pull request Dec 27, 2025
tarcieri added a commit that referenced this pull request Dec 27, 2025
### Added
- Additional `Choice::from_u128*` constructors (#1285)
- `CtNeg` trait (#1286)

### Changed
- Renamed `Choice::from_*_nonzero` => `from_*_nz` (#1287)
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