]> git.lizzy.rs Git - rust.git/commitdiff
Small cleanup
authormcarton <cartonmartin+git@gmail.com>
Tue, 21 Jun 2016 21:53:24 +0000 (23:53 +0200)
committermcarton <cartonmartin+git@gmail.com>
Wed, 29 Jun 2016 15:09:39 +0000 (17:09 +0200)
clippy_lints/src/minmax.rs

index a88324aaf50ff6708d299db2817ce95d3be2b89a..8d3af7742a94b599ab4ab89da517d7254999a72e 100644 (file)
@@ -83,11 +83,9 @@ fn fetch_const(args: &[P<Expr>], m: MinMax) -> Option<(MinMax, Constant, &Expr)>
         } else {
             None
         }
+    } else if let Some(c) = constant_simple(&args[1]) {
+        Some((m, c, &args[0]))
     } else {
-        if let Some(c) = constant_simple(&args[1]) {
-            Some((m, c, &args[0]))
-        } else {
-            None
-        }
+        None
     }
 }