Skip to content

Commit

Permalink
Use int assoc consts in MANUAL_SATURATING_ARITHMETIC
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Apr 7, 2020
1 parent 701cb96 commit f1f9db7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,8 @@ declare_clippy_lint! {
/// ```rust
/// # let y: u32 = 0;
/// # let x: u32 = 100;
/// let add = x.checked_add(y).unwrap_or(u32::max_value());
/// 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);
/// ```
///
/// can be written using dedicated methods for saturating addition/subtraction as:
Expand Down

0 comments on commit f1f9db7

Please sign in to comment.