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

saturating_mul methods? #23975

Closed
SimonSapin opened this issue Apr 2, 2015 · 3 comments
Closed

saturating_mul methods? #23975

SimonSapin opened this issue Apr 2, 2015 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@SimonSapin
Copy link
Contributor

Integers have checked_add, checked_mul, and saturating_add methods, but not saturating_mul. Is there a reason not to have this in std?

CC @aturon

@pnkfelix
Copy link
Member

pnkfelix commented Apr 2, 2015

I suspect we want the full set, saturating_add, saturating_sub, saturating_mul, saturating_div (not sure about whether saturating_rem makes any sense).

See also rust-lang/rfcs#928 and rust-lang/rfcs#964

@steveklabnik steveklabnik added A-libs C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Apr 3, 2015
@apasel422
Copy link
Contributor

saturating_mul now exists for all integer types.

@alexcrichton
Copy link
Member

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

5 participants