Skip to content

Commit

Permalink
Remove clone call from Copy type
Browse files Browse the repository at this point in the history
Found with clippy, just use `Copy`.
  • Loading branch information
tcharding committed May 16, 2024
1 parent f939367 commit a1a5467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitcoind-tests/tests/test_desc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub fn test_desc_satisfy(
let internal_key_present = x_only_pks
.iter()
.position(|&x| x.to_public_key() == *tr.internal_key());
let internal_keypair = internal_key_present.map(|idx| xonly_keypairs[idx].clone());
let internal_keypair = internal_key_present.map(|idx| xonly_keypairs[idx]);
let prevouts = [witness_utxo];
let prevouts = sighash::Prevouts::All(&prevouts);

Expand Down Expand Up @@ -188,7 +188,7 @@ pub fn test_desc_satisfy(
let leaf_hash = TapLeafHash::from_script(&ms.encode(), LeafVersion::TapScript);
ms.iter_pk().filter_map(move |pk| {
let i = x_only_pks.iter().position(|&x| x.to_public_key() == pk);
i.map(|idx| (xonly_keypairs[idx].clone(), leaf_hash))
i.map(|idx| (xonly_keypairs[idx], leaf_hash))
})
})
.collect();
Expand Down

0 comments on commit a1a5467

Please sign in to comment.