File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -137,17 +137,14 @@ pub enum Wildcard {
137
137
}
138
138
139
139
impl SinglePriv {
140
- /// Returns the public key of this key
141
- fn to_public < C : Signing > (
142
- & self ,
143
- secp : & Secp256k1 < C > ,
144
- ) -> Result < SinglePub , DescriptorKeyParseError > {
140
+ /// Returns the public key of this key.
141
+ fn to_public < C : Signing > ( & self , secp : & Secp256k1 < C > ) -> SinglePub {
145
142
let pub_key = self . key . public_key ( secp) ;
146
143
147
- Ok ( SinglePub {
144
+ SinglePub {
148
145
origin : self . origin . clone ( ) ,
149
146
key : SinglePubKey :: FullKey ( pub_key) ,
150
- } )
147
+ }
151
148
}
152
149
}
153
150
@@ -254,9 +251,7 @@ impl DescriptorSecretKey {
254
251
secp : & Secp256k1 < C > ,
255
252
) -> Result < DescriptorPublicKey , DescriptorKeyParseError > {
256
253
Ok ( match self {
257
- & DescriptorSecretKey :: Single ( ref sk) => {
258
- DescriptorPublicKey :: Single ( sk. to_public ( secp) ?)
259
- }
254
+ & DescriptorSecretKey :: Single ( ref sk) => DescriptorPublicKey :: Single ( sk. to_public ( secp) ) ,
260
255
& DescriptorSecretKey :: XPrv ( ref xprv) => {
261
256
DescriptorPublicKey :: XPub ( xprv. to_public ( secp) ?)
262
257
}
You can’t perform that action at this time.
0 commit comments