Bugfix the bugfix.

This commit is contained in:
laurent 2017-12-01 19:27:02 +00:00
parent 904f27a2ea
commit c3a8946a46

View 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 cant 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()) &&