]> Untitled Git - bdk/commitdiff
destructure tuple to improve clarity
authorRiccardo Casatta <riccardo@casatta.it>
Thu, 15 Apr 2021 14:07:02 +0000 (16:07 +0200)
committerRiccardo Casatta <riccardo@casatta.it>
Fri, 16 Apr 2021 10:22:47 +0000 (12:22 +0200)
src/descriptor/policy.rs

index cc04894abf7eb0d03ee31c0f7437187c87e9cf01..aa8c11c62d24eaa2c4aaa1e9aadb071a9ff1d850 100644 (file)
@@ -767,8 +767,8 @@ fn signature_in_psbt(psbt: &PSBT, key: &DescriptorPublicKey, secp: &SecpCtx) ->
             let pubkey = input
                 .bip32_derivation
                 .iter()
-                .find(|s| s.1 .0 == xpub.root_fingerprint(secp))
-                .map(|f| f.0);
+                .find(|(_, (f, _))| *f == xpub.root_fingerprint(secp))
+                .map(|(p, _)| p);
             //TODO check actual derivation matches
             match pubkey {
                 Some(pubkey) => input.partial_sigs.contains_key(pubkey),