From 1647f53fb3064e7bf86d396b401bca0f90a9d51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 8 Apr 2020 00:24:18 +0200 Subject: [PATCH] Use int assoc consts in MANUAL_SATURATING_ARITHMETIC --- clippy_lints/src/methods/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 124fc1d9878e..31dbf6b2b385 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -1138,8 +1138,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: