Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero trait #35

Merged
merged 1 commit into from
Nov 13, 2021
Merged

Zero trait #35

merged 1 commit into from
Nov 13, 2021

Conversation

tarcieri
Copy link
Member

Extracts a Zero trait from the Integer trait which contains only the associated ZERO constant and the is_zero method with a default implementation.

Changes the mandatory bound for NonZero to be the Zero trait rather than the much more restrictive Integer

This makes it possible to impl Zero on Limb even though it doesn't impl the full set of Integer traits, and therefore use NonZero<Limb>.

Extracts a `Zero` trait from the `Integer` trait which contains only the
associated `ZERO` constant and the `is_zero` method with a default
implementation.

Changes the mandatory bound for `NonZero` to be the `Zero` trait rather
than the much more restrictive `Integer`

This makes it possible to impl `Zero` on `Limb` even though it doesn't
impl the full set of `Integer` traits, and therefore use
`NonZero<Limb>`.
@tarcieri tarcieri merged commit 25fef4e into master Nov 13, 2021
@tarcieri tarcieri deleted the zero-trait branch November 13, 2021 21:04
@tarcieri tarcieri mentioned this pull request Nov 14, 2021
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.

1 participant