Skip to content

Commit ccc808a

Browse files
committed
Use iterator instead of array access
Clear clippy warning: the loop variable `i` is only used to index `sks`
1 parent badeb44 commit ccc808a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitcoind-tests/tests/setup/test_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ fn setup_keys(
8686
let mut x_only_keypairs = vec![];
8787
let mut x_only_pks = vec![];
8888

89-
for i in 0..n {
90-
let keypair = bitcoin::secp256k1::Keypair::from_secret_key(&secp_sign, &sks[i]);
89+
for sk in &sks {
90+
let keypair = bitcoin::secp256k1::Keypair::from_secret_key(&secp_sign, &sk);
9191
let (xpk, _parity) = XOnlyPublicKey::from_keypair(&keypair);
9292
x_only_keypairs.push(keypair);
9393
x_only_pks.push(xpk);

0 commit comments

Comments
 (0)