I have the following:
use num_bigint::BigUint;
fn add_one(px: &BigUint, py: &BigUint) -> (BigUint, BigUint) {
(px+1u32, py+1u32)
}
fn test(x: &[u8], y: &[u8]) {
let x = BigUint::from_bytes_le(x);
let y = BigUint::from_bytes_le(y);
for _ in 1..5 {
let (x,y) = add_one(&x, &y);
}
}
I am getting the warning:
warning: unused variable: `x`
--> src/lib.rs:109:14
|
109 | let (x,y) = ecc_add(&x, &y, &x, &y);
| ^ help: if this is intentional, prefix it with an underscore: `_x`
This is not intentional because I want to modify x
and y
in each iteration.
How do I shadow variables in the for-loop?