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

Breaking changes for 0.3.x #20

Closed
4 tasks done
tarcieri opened this issue Sep 21, 2021 · 1 comment
Closed
4 tasks done

Breaking changes for 0.3.x #20

tarcieri opened this issue Sep 21, 2021 · 1 comment

Comments

@tarcieri
Copy link
Member

tarcieri commented Sep 21, 2021

This is a tracking ticket for breaking changes to make in a v0.3.x release

  • Add all non-const inherent methods to traits: I would suggest all inherent methods be const fn, and anything that isn't const fn be a trait method. Right now there are some non-const fn inherent methods which aren't usable via traits which should get added to traits
  • Use NonZero to fix random_mod can take a very long time #3 (random_mod with a zero modulus)
  • Update Div and Rem impls to use NonZero.
  • Fix mul_wide inconsistencies #4, perhaps with a struct with lo and hi fields for maximum clarity

Others?

tarcieri added a commit that referenced this issue Nov 13, 2021
Bumps `edition = "2021"` and adds `rust-version = 1.56`.

This is the first in a set of breaking changes proposed in #20, and as
such bumps the version to v0.3.0-pre (not for release).
tarcieri added a commit that referenced this issue Nov 13, 2021
Bumps `edition = "2021"` and adds `rust-version = 1.56`.

This is the first in a set of breaking changes proposed in #20, and as
such bumps the version to v0.3.0-pre (not for release).
tarcieri added a commit that referenced this issue Nov 13, 2021
Bumps `edition = "2021"` and adds `rust-version = 1.56`.

This is the first in a set of breaking changes proposed in #20, and as
such bumps the version to v0.3.0-pre (not for release).
@tarcieri
Copy link
Member Author

These are now effectively complete.

There are a few remaining pub fn inherent methods that didn't receive traits:

  • NonZero::from_*_bytes: these return CtOption and are therefore different from Encoding
  • Limb: is_odd, cmp_vartime
  • UInt: checked_and, checked_div, checked_or, checked_rem, checked_sqrt, checked_xor, div_rem, reduce, square

We can circle back on any of these after the next breaking release.

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

No branches or pull requests

1 participant