Skip to content

Commit

Permalink
Use iterator instead of array access
Browse files Browse the repository at this point in the history
Clear clippy warning:

  the loop variable `i` is only used to index `sks`
  • Loading branch information
tcharding committed May 16, 2024
1 parent badeb44 commit ccc808a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitcoind-tests/tests/setup/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fn setup_keys(
let mut x_only_keypairs = vec![];
let mut x_only_pks = vec![];

for i in 0..n {
let keypair = bitcoin::secp256k1::Keypair::from_secret_key(&secp_sign, &sks[i]);
for sk in &sks {
let keypair = bitcoin::secp256k1::Keypair::from_secret_key(&secp_sign, &sk);
let (xpk, _parity) = XOnlyPublicKey::from_keypair(&keypair);
x_only_keypairs.push(keypair);
x_only_pks.push(xpk);
Expand Down

0 comments on commit ccc808a

Please sign in to comment.