]> git.lizzy.rs Git - rust.git/commitdiff
Bugfix the bugfix.
authorlaurent <laurent.mazare@gmail.com>
Fri, 1 Dec 2017 19:27:02 +0000 (19:27 +0000)
committerlaurent <laurent.mazare@gmail.com>
Fri, 1 Dec 2017 19:27:02 +0000 (19:27 +0000)
clippy_lints/src/copies.rs

index 140b895526dbbc7510b65e2072dc87e55cbf00ce..181158a5f175b9ae86839ff8e6b5626ff283a540 100644 (file)
@@ -187,7 +187,7 @@ fn lint_match_arms(cx: &LateContext, expr: &Expr) {
 
         let eq = |&(lindex, lhs): &(usize, &Arm), &(rindex, rhs): &(usize, &Arm)| -> bool {
             let min_index = usize::min(lindex, rindex);
-            let max_index = usize::max(rindex, rindex);
+            let max_index = usize::max(lindex, rindex);
             // Arms with a guard are ignored, those can’t always be merged together
             // This is also the case for arms in-between each there is an arm with a guard
             (min_index..=max_index).all(|index| arms[index].guard.is_none()) &&