@@ -196,10 +196,7 @@ impl SinglePriv {
196
196
fn to_public < C : Signing > ( & self , secp : & Secp256k1 < C > ) -> SinglePub {
197
197
let pub_key = self . key . public_key ( secp) ;
198
198
199
- SinglePub {
200
- origin : self . origin . clone ( ) ,
201
- key : SinglePubKey :: FullKey ( pub_key) ,
202
- }
199
+ SinglePub { origin : self . origin . clone ( ) , key : SinglePubKey :: FullKey ( pub_key) }
203
200
}
204
201
}
205
202
@@ -351,12 +348,7 @@ impl DescriptorSecretKey {
351
348
match self {
352
349
DescriptorSecretKey :: Single ( ..) | DescriptorSecretKey :: XPrv ( ..) => vec ! [ self ] ,
353
350
DescriptorSecretKey :: MultiXPrv ( xpub) => {
354
- let DescriptorMultiXKey {
355
- origin,
356
- xkey,
357
- derivation_paths,
358
- wildcard,
359
- } = xpub;
351
+ let DescriptorMultiXKey { origin, xkey, derivation_paths, wildcard } = xpub;
360
352
derivation_paths
361
353
. into_paths ( )
362
354
. into_iter ( )
@@ -686,12 +678,7 @@ impl DescriptorPublicKey {
686
678
match self {
687
679
DescriptorPublicKey :: Single ( ..) | DescriptorPublicKey :: XPub ( ..) => vec ! [ self ] ,
688
680
DescriptorPublicKey :: MultiXPub ( xpub) => {
689
- let DescriptorMultiXKey {
690
- origin,
691
- xkey,
692
- derivation_paths,
693
- wildcard,
694
- } = xpub;
681
+ let DescriptorMultiXKey { origin, xkey, derivation_paths, wildcard } = xpub;
695
682
derivation_paths
696
683
. into_paths ( )
697
684
. into_iter ( )
@@ -718,10 +705,7 @@ impl FromStr for DescriptorSecretKey {
718
705
if key_part. len ( ) <= 52 {
719
706
let sk = bitcoin:: PrivateKey :: from_str ( key_part)
720
707
. map_err ( |_| DescriptorKeyParseError ( "Error while parsing a WIF private key" ) ) ?;
721
- Ok ( DescriptorSecretKey :: Single ( SinglePriv {
722
- key : sk,
723
- origin : None ,
724
- } ) )
708
+ Ok ( DescriptorSecretKey :: Single ( SinglePriv { key : sk, origin : None } ) )
725
709
} else {
726
710
let ( xpriv, derivation_paths, wildcard) =
727
711
parse_xkey_deriv :: < bip32:: ExtendedPrivKey > ( key_part) ?;
@@ -998,8 +982,7 @@ impl MiniscriptKey for DescriptorPublicKey {
998
982
fn is_uncompressed ( & self ) -> bool {
999
983
match self {
1000
984
DescriptorPublicKey :: Single ( SinglePub {
1001
- key : SinglePubKey :: FullKey ( ref key) ,
1002
- ..
985
+ key : SinglePubKey :: FullKey ( ref key) , ..
1003
986
} ) => key. is_uncompressed ( ) ,
1004
987
_ => false ,
1005
988
}
@@ -1008,10 +991,7 @@ impl MiniscriptKey for DescriptorPublicKey {
1008
991
fn is_x_only_key ( & self ) -> bool {
1009
992
matches ! (
1010
993
self ,
1011
- DescriptorPublicKey :: Single ( SinglePub {
1012
- key: SinglePubKey :: XOnly ( ref _key) ,
1013
- ..
1014
- } )
994
+ DescriptorPublicKey :: Single ( SinglePub { key: SinglePubKey :: XOnly ( ref _key) , .. } )
1015
995
)
1016
996
}
1017
997
0 commit comments