Skip to content

Commit aa78d6c

Browse files
committed
Resolve needless_borrow clippy lint
error: this expression borrows a value the compiler would automatically borrow --> tests/../src/lexical/math.rs:597:25 | 597 | for (xi, yi) in (&mut x[xstart..]).iter_mut().zip(y.iter()) { | ^^^^^^^^^^^^^^^^^^ help: change this to: `x[xstart..]` | = note: `-D clippy::needless-borrow` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
1 parent 98cafac commit aa78d6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lexical/math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ mod large {
594594

595595
// Iteratively add elements from y to x.
596596
let mut carry = false;
597-
for (xi, yi) in (&mut x[xstart..]).iter_mut().zip(y.iter()) {
597+
for (xi, yi) in x[xstart..].iter_mut().zip(y.iter()) {
598598
// Only one op of the two can overflow, since we added at max
599599
// Limb::max_value() + Limb::max_value(). Add the previous carry,
600600
// and store the current carry for the next.

0 commit comments

Comments
 (0)