mirror of
https://github.com/serde-rs/json.git
synced 2026-03-14 02:07:40 +00:00
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
This commit is contained in:
parent
98cafacefe
commit
aa78d6ca4e
@ -594,7 +594,7 @@ mod large {
|
||||
|
||||
// Iteratively add elements from y to x.
|
||||
let mut carry = false;
|
||||
for (xi, yi) in (&mut x[xstart..]).iter_mut().zip(y.iter()) {
|
||||
for (xi, yi) in x[xstart..].iter_mut().zip(y.iter()) {
|
||||
// Only one op of the two can overflow, since we added at max
|
||||
// Limb::max_value() + Limb::max_value(). Add the previous carry,
|
||||
// and store the current carry for the next.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user