@@ -196,10 +196,7 @@ impl SinglePriv {
196196 fn to_public < C : Signing > ( & self , secp : & Secp256k1 < C > ) -> SinglePub {
197197 let pub_key = self . key . public_key ( secp) ;
198198
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) }
203200 }
204201}
205202
@@ -351,12 +348,7 @@ impl DescriptorSecretKey {
351348 match self {
352349 DescriptorSecretKey :: Single ( ..) | DescriptorSecretKey :: XPrv ( ..) => vec ! [ self ] ,
353350 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;
360352 derivation_paths
361353 . into_paths ( )
362354 . into_iter ( )
@@ -686,12 +678,7 @@ impl DescriptorPublicKey {
686678 match self {
687679 DescriptorPublicKey :: Single ( ..) | DescriptorPublicKey :: XPub ( ..) => vec ! [ self ] ,
688680 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;
695682 derivation_paths
696683 . into_paths ( )
697684 . into_iter ( )
@@ -718,10 +705,7 @@ impl FromStr for DescriptorSecretKey {
718705 if key_part. len ( ) <= 52 {
719706 let sk = bitcoin:: PrivateKey :: from_str ( key_part)
720707 . 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 } ) )
725709 } else {
726710 let ( xpriv, derivation_paths, wildcard) =
727711 parse_xkey_deriv :: < bip32:: ExtendedPrivKey > ( key_part) ?;
@@ -998,8 +982,7 @@ impl MiniscriptKey for DescriptorPublicKey {
998982 fn is_uncompressed ( & self ) -> bool {
999983 match self {
1000984 DescriptorPublicKey :: Single ( SinglePub {
1001- key : SinglePubKey :: FullKey ( ref key) ,
1002- ..
985+ key : SinglePubKey :: FullKey ( ref key) , ..
1003986 } ) => key. is_uncompressed ( ) ,
1004987 _ => false ,
1005988 }
@@ -1008,10 +991,7 @@ impl MiniscriptKey for DescriptorPublicKey {
1008991 fn is_x_only_key ( & self ) -> bool {
1009992 matches ! (
1010993 self ,
1011- DescriptorPublicKey :: Single ( SinglePub {
1012- key: SinglePubKey :: XOnly ( ref _key) ,
1013- ..
1014- } )
994+ DescriptorPublicKey :: Single ( SinglePub { key: SinglePubKey :: XOnly ( ref _key) , .. } )
1015995 )
1016996 }
1017997
0 commit comments