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