Skip to content

Commit f1f9db7

Browse files
committed
Use int assoc consts in MANUAL_SATURATING_ARITHMETIC
1 parent 701cb96 commit f1f9db7

File tree

1 file changed

+2
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1137,8 +1137,8 @@ declare_clippy_lint! {
11371137
/// ```rust
11381138
/// # let y: u32 = 0;
11391139
/// # let x: u32 = 100;
1140-
/// let add = x.checked_add(y).unwrap_or(u32::max_value());
1141-
/// let sub = x.checked_sub(y).unwrap_or(u32::min_value());
1140+
/// let add = x.checked_add(y).unwrap_or(u32::MAX);
1141+
/// let sub = x.checked_sub(y).unwrap_or(u32::MIN);
11421142
/// ```
11431143
///
11441144
/// can be written using dedicated methods for saturating addition/subtraction as:

0 commit comments

Comments
 (0)