Uh oh!
There was an error while loading. Please reload this page.
Saturating math - #8323
Closed
lilyball wants to merge 2 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
It seems odd to use static methods here - is there a reason not to use normal methods?
ContributorAuthor
There was a problem hiding this comment.
I didn't like the idea of saying a.saturating_add(b). Just seemed odd to me.
Saturating is an implementation of saturating math operations (at the moment just add and sub) for integral types.
Replace hand-rolled saturation math with calls to Saturating. Fix one impl that didn't use saturating math.
lilyball
commented
Aug 6, 2013
ContributorAuthor
r? @thestinger |
bors added a commit
that referenced
this pull request
Aug 7, 2013
Implement saturating math in `std::num::Saturating` and use it for `Iterator` impls
brendanzab
commented
Aug 7, 2013
Contributor
This relates to #4819 |
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 10, 2022
flip1995 pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 10, 2022
…xFrednet warn if we find multiple clippy configs Fixesrust-lang#8323 --- *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: warn if we find multiple clippy configs
U007D pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
8323: Only remember blocks that have a DefMap r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement saturating math in
std::num::Saturatingand use it forIteratorimpls