]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/minmax.rs
Add lint for redundant pattern matching in iflet for Result/Option
[rust.git] / clippy_lints / src / minmax.rs
index 05d4d40e0abe003217a584ab6b9a3d278339d12a..91906241ff5b1cd30e7eb0de066f3974942d02cc 100644 (file)
@@ -85,7 +85,7 @@ fn fetch_const(args: &[P<Expr>], m: MinMax) -> Option<(MinMax, Constant, &Expr)>
         return None;
     }
     if let Some(c) = constant_simple(&args[0]) {
-        if let None = constant_simple(&args[1]) {
+        if constant_simple(&args[1]).is_none() {
             // otherwise ignore
             Some((m, c, &args[1]))
         } else {