@@ -309,8 +309,8 @@ macro_rules! nonzero_unsigned_operations {
309
309
( $( $Ty: ident( $Int: ident) ; ) + ) => {
310
310
$(
311
311
impl $Ty {
312
- /// Add an unsigned integer to a non-zero value.
313
- /// Check for overflow and return [`None`] on overflow
312
+ /// Adds an unsigned integer to a non-zero value.
313
+ /// Checks for overflow and returns [`None`] on overflow.
314
314
/// As a consequence, the result cannot wrap to zero.
315
315
///
316
316
///
@@ -346,7 +346,7 @@ macro_rules! nonzero_unsigned_operations {
346
346
}
347
347
}
348
348
349
- /// Add an unsigned integer to a non-zero value.
349
+ /// Adds an unsigned integer to a non-zero value.
350
350
#[ doc = concat!( "Return [`" , stringify!( $Int) , "::MAX`] on overflow." ) ]
351
351
///
352
352
/// # Examples
@@ -377,7 +377,7 @@ macro_rules! nonzero_unsigned_operations {
377
377
unsafe { $Ty:: new_unchecked( self . get( ) . saturating_add( other) ) }
378
378
}
379
379
380
- /// Add an unsigned integer to a non-zero value,
380
+ /// Adds an unsigned integer to a non-zero value,
381
381
/// assuming overflow cannot occur.
382
382
/// Overflow is unchecked, and it is undefined behaviour to overflow
383
383
/// *even if the result would wrap to a non-zero value*.
@@ -409,7 +409,7 @@ macro_rules! nonzero_unsigned_operations {
409
409
}
410
410
411
411
/// Returns the smallest power of two greater than or equal to n.
412
- /// Check for overflow and return [`None`]
412
+ /// Checks for overflow and returns [`None`]
413
413
/// if the next power of two is greater than the type’s maximum value.
414
414
/// As a consequence, the result cannot wrap to zero.
415
415
///
@@ -545,7 +545,7 @@ macro_rules! nonzero_signed_operations {
545
545
}
546
546
547
547
/// Checked absolute value.
548
- /// Check for overflow and returns [`None`] if
548
+ /// Checks for overflow and returns [`None`] if
549
549
#[ doc = concat!( "`self == " , stringify!( $Int) , "::MIN`." ) ]
550
550
/// The result cannot be zero.
551
551
///
@@ -740,8 +740,8 @@ macro_rules! nonzero_unsigned_signed_operations {
740
740
( $( $signedness: ident $Ty: ident( $Int: ty) ; ) + ) => {
741
741
$(
742
742
impl $Ty {
743
- /// Multiply two non-zero integers together.
744
- /// Check for overflow and return [`None`] on overflow.
743
+ /// Multiplies two non-zero integers together.
744
+ /// Checks for overflow and returns [`None`] on overflow.
745
745
/// As a consequence, the result cannot wrap to zero.
746
746
///
747
747
/// # Examples
@@ -777,7 +777,7 @@ macro_rules! nonzero_unsigned_signed_operations {
777
777
}
778
778
}
779
779
780
- /// Multiply two non-zero integers together.
780
+ /// Multiplies two non-zero integers together.
781
781
#[ doc = concat!( "Return [`" , stringify!( $Int) , "::MAX`] on overflow." ) ]
782
782
///
783
783
/// # Examples
@@ -809,7 +809,7 @@ macro_rules! nonzero_unsigned_signed_operations {
809
809
unsafe { $Ty:: new_unchecked( self . get( ) . saturating_mul( other. get( ) ) ) }
810
810
}
811
811
812
- /// Multiply two non-zero integers together,
812
+ /// Multiplies two non-zero integers together,
813
813
/// assuming overflow cannot occur.
814
814
/// Overflow is unchecked, and it is undefined behaviour to overflow
815
815
/// *even if the result would wrap to a non-zero value*.
@@ -849,8 +849,8 @@ macro_rules! nonzero_unsigned_signed_operations {
849
849
unsafe { $Ty:: new_unchecked( self . get( ) . unchecked_mul( other. get( ) ) ) }
850
850
}
851
851
852
- /// Raise non-zero value to an integer power.
853
- /// Check for overflow and return [`None`] on overflow.
852
+ /// Raises non-zero value to an integer power.
853
+ /// Checks for overflow and returns [`None`] on overflow.
854
854
/// As a consequence, the result cannot wrap to zero.
855
855
///
856
856
/// # Examples
0 commit comments