Skip to content

Commit 5e3352c

Browse files
committed
Update the names for overflowing results
1 parent 5b62992 commit 5e3352c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ops/overflowing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ macro_rules! overflowing_impl {
1717

1818
/// Performs addition with a flag for overflow.
1919
pub trait OverflowingAdd: Sized + Add<Self, Output = Self> {
20-
/// Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur.
20+
/// Returns a tuple of the sum along with a boolean indicating whether an arithmetic overflow would occur.
2121
/// If an overflow would have occurred then the wrapped value is returned.
2222
fn overflowing_add(&self, v: &Self) -> (Self, bool);
2323
}
@@ -40,7 +40,7 @@ overflowing_impl!(OverflowingAdd, overflowing_add, i128);
4040

4141
/// Performs substraction with a flag for overflow.
4242
pub trait OverflowingSub: Sized + Sub<Self, Output = Self> {
43-
/// Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow would occur.
43+
/// Returns a tuple of the difference along with a boolean indicating whether an arithmetic overflow would occur.
4444
/// If an overflow would have occurred then the wrapped value is returned.
4545
fn overflowing_sub(&self, v: &Self) -> (Self, bool);
4646
}
@@ -63,7 +63,7 @@ overflowing_impl!(OverflowingSub, overflowing_sub, i128);
6363

6464
/// Performs multiplication with a flag for overflow.
6565
pub trait OverflowingMul: Sized + Mul<Self, Output = Self> {
66-
/// Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow would occur.
66+
/// Returns a tuple of the product along with a boolean indicating whether an arithmetic overflow would occur.
6767
/// If an overflow would have occurred then the wrapped value is returned.
6868
fn overflowing_mul(&self, v: &Self) -> (Self, bool);
6969
}

0 commit comments

Comments
 (0)