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

Add Overflowing trait #180

Merged
merged 3 commits into from
Oct 29, 2020
Merged

Conversation

KaczuH
Copy link

@KaczuH KaczuH commented Jul 17, 2020

Closes issue #168

I've been inspired by saturated.rs

Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR -- the code looks good, but I'd like to tweak the docs a little.

};
}

/// If an overflow would have occurred then the wrapped value is returned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line seems like it would better belong as the second sentence of the method docs. At the top we need a more general description, perhaps something simple like "Performs addition with a flag for overflow."

The same goes for OverflowingSub/Mul.

@KaczuH KaczuH requested a review from cuviper October 24, 2020 12:38
@cuviper
Copy link
Member

cuviper commented Oct 29, 2020

LGTM, thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 29, 2020

@bors bors bot merged commit 26c9ad2 into rust-num:master Oct 29, 2020
@cuviper cuviper mentioned this pull request Oct 29, 2020
@KaczuH KaczuH deleted the issue-168-no-overflowing-traits branch November 2, 2020 12:27
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