Skip to content

Commit 81fa758

Browse files
author
Michael Wright
committed
Improve variable naming 2
1 parent c8f909e commit 81fa758

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/matches.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,17 +1601,17 @@ fn all_ranges<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>], ty: Ty<'tcx>)
16011601
.filter_map(|arm| {
16021602
if let Arm { pat, guard: None, .. } = *arm {
16031603
if let PatKind::Range(ref lhs, ref rhs, range_end) = pat.kind {
1604-
let lhs = match lhs {
1604+
let lhs_const = match lhs {
16051605
Some(lhs) => constant(cx, cx.typeck_results(), lhs)?.0,
16061606
None => miri_to_const(ty.numeric_min_val(cx.tcx)?)?,
16071607
};
1608-
let rhs = match rhs {
1608+
let rhs_const = match rhs {
16091609
Some(rhs) => constant(cx, cx.typeck_results(), rhs)?.0,
16101610
None => miri_to_const(ty.numeric_max_val(cx.tcx)?)?,
16111611
};
16121612

1613-
let lhs_val = lhs.int_value(cx, ty)?;
1614-
let rhs_val = rhs.int_value(cx, ty)?;
1613+
let lhs_val = lhs_const.int_value(cx, ty)?;
1614+
let rhs_val = rhs_const.int_value(cx, ty)?;
16151615

16161616
let rhs_bound = match range_end {
16171617
RangeEnd::Included => EndBound::Included(rhs_val),

0 commit comments

Comments
 (0)