We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d179959 commit be5e042Copy full SHA for be5e042
src/descriptor/key.rs
@@ -253,12 +253,12 @@ impl DescriptorSecretKey {
253
&self,
254
secp: &Secp256k1<C>,
255
) -> Result<DescriptorPublicKey, DescriptorKeyParseError> {
256
- Ok(match self {
257
- &DescriptorSecretKey::Single(ref sk) => DescriptorPublicKey::Single(sk.to_public(secp)),
258
- &DescriptorSecretKey::XPrv(ref xprv) => {
259
- DescriptorPublicKey::XPub(xprv.to_public(secp)?)
260
- }
261
- })
+ let pk = match self {
+ DescriptorSecretKey::Single(prv) => DescriptorPublicKey::Single(prv.to_public(secp)),
+ DescriptorSecretKey::XPrv(xprv) => DescriptorPublicKey::XPub(xprv.to_public(secp)?),
+ };
+
+ Ok(pk)
262
}
263
264
0 commit comments