We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 701cb96 commit f1f9db7Copy full SHA for f1f9db7
clippy_lints/src/methods/mod.rs
@@ -1137,8 +1137,8 @@ declare_clippy_lint! {
1137
/// ```rust
1138
/// # let y: u32 = 0;
1139
/// # 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());
+ /// let add = x.checked_add(y).unwrap_or(u32::MAX);
+ /// let sub = x.checked_sub(y).unwrap_or(u32::MIN);
1142
/// ```
1143
///
1144
/// can be written using dedicated methods for saturating addition/subtraction as:
0 commit comments