Skip to content

Commit 5714f09

Browse files
committed
descriptor: impl error for DescriptorKeyParseError
Signed-off-by: Antoine Poinsot <[email protected]>
1 parent 8e47d31 commit 5714f09

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/descriptor/mod.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
//! these with BIP32 paths, pay-to-contract instructions, etc.
2424
//!
2525
26-
use std::fmt;
2726
use std::str::{self, FromStr};
27+
use std::{error, fmt};
2828

2929
use bitcoin::blockdata::{opcodes, script};
3030
use bitcoin::hashes::hash160;
@@ -104,6 +104,16 @@ impl fmt::Display for DescriptorKeyParseError {
104104
}
105105
}
106106

107+
impl error::Error for DescriptorKeyParseError {
108+
fn description(&self) -> &str {
109+
""
110+
}
111+
112+
fn cause(&self) -> Option<&error::Error> {
113+
None
114+
}
115+
}
116+
107117
impl fmt::Display for DescriptorPublicKey {
108118
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
109119
match *self {

0 commit comments

Comments
 (0)