8000 clippy · EbTech/rust-algorithms@c37757c · GitHub
[go: up one dir, main page]

Skip to content

Commit c37757c

Browse files
committed
clippy
1 parent 9ad439d commit c37757c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/li_chao.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ impl LiChaoTree {
3838
return;
3939
}
4040
let ix = ((r - self.left + l - self.left) / 2) as usize;
41-
let x = self.left + (ix as i64);
41+
let mid = self.left + (ix as i64);
4242
let (ref mut m_ix, ref mut b_ix) = self.lines[ix];
43-
if m * x + b > *m_ix * x + *b_ix {
43+
if m * mid + b > *m_ix * mid + *b_ix {
4444
std::mem::swap(&mut m, m_ix);
4545
std::mem::swap(&mut b, b_ix);
4646
}
4747
if m < self.lines[ix].0 {
48-
self.add_line_impl(m, b, l, x);
48+
self.add_line_impl(m, b, l, mid);
4949
} else {
50-
self.add_line_impl(m, b, x + 1, r);
50+
self.add_line_impl(m, b, mid + 1, r);
5151
}
5252
}
5353

0 commit comments

Comments
 (0)
0