Skip to content

Conversation

@tarcieri
Copy link
Member

The two APIs are nearly identical. The only difference is the latter is infallible and panics if an invalid precision is given.

This also changes BoxedUint::max to have the same behavior.

Whether they should panic is a debatable point. Indeed having both options would be good, but it should probably return CtOption where BoxedUint::max was returning Option.

Regardless, this removes duplication and makes the API at least more consistent with itself.

The two APIs are nearly identical. The only difference is the latter is
infallible and panics if an invalid precision is given.

This also changes `BoxedUint::max` to have the same behavior.

Whether they should panic is a debatable point. Indeed having both
options would be good, but it should probably return `CtOption` where
`BoxedUint::max` was returning `Option`.

Regardless, this removes duplication and makes the API at least more
consistent with itself.
@tarcieri tarcieri merged commit e334064 into master Nov 27, 2023
@tarcieri tarcieri deleted the boxed-uint/replace-new-with-zero branch November 27, 2023 01:15
@tarcieri tarcieri mentioned this pull request Jan 22, 2025
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