Skip to content

Commit a1a5467

Browse files
committed
Remove clone call from Copy type
Found with clippy, just use `Copy`.
1 parent f939367 commit a1a5467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitcoind-tests/tests/test_desc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn test_desc_satisfy(
160160
let internal_key_present = x_only_pks
161161
.iter()
162162
.position(|&x| x.to_public_key() == *tr.internal_key());
163-
let internal_keypair = internal_key_present.map(|idx| xonly_keypairs[idx].clone());
163+
let internal_keypair = internal_key_present.map(|idx| xonly_keypairs[idx]);
164164
let prevouts = [witness_utxo];
165165
let prevouts = sighash::Prevouts::All(&prevouts);
166166

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

0 commit comments

Comments
 (0)