Skip to content

Commit 6de4abe

Browse files
committed
Remove unused error return
The `to_public` method on `DescriptorSinglePriv` never errors, no need to return an error type.
1 parent 0844e57 commit 6de4abe

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/descriptor/key.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,14 @@ pub struct DescriptorXKey<K: InnerXKey> {
138138
}
139139

140140
impl DescriptorSinglePriv {
141-
/// Returns the public key of this key
142-
fn to_public<C: Signing>(
143-
&self,
144-
secp: &Secp256k1<C>,
145-
) -> Result<DescriptorSinglePub, DescriptorKeyParseError> {
141+
/// Returns the public key of this key.
142+
fn to_public<C: Signing>(&self, secp: &Secp256k1<C>) -> DescriptorSinglePub {
146143
let pub_key = self.key.public_key(secp);
147144

148-
Ok(DescriptorSinglePub {
145+
DescriptorSinglePub {
149146
origin: self.origin.clone(),
150147
key: SinglePubKey::FullKey(pub_key),
151-
})
148+
}
152149
}
153150
}
154151

0 commit comments

Comments
 (0)