Skip to content

Commit d083910

Browse files
Implement std::error::Error for crate::Error
1 parent 2d30a6f commit d083910

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ impl fmt::Debug for Error {
9696
}
9797
}
9898

99+
impl std::fmt::Display for Error {
100+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
101+
write!(f, "{:?}", self)
102+
}
103+
}
104+
105+
impl std::error::Error for Error {}
106+
99107
const LOCAL_IP: Ipv4Addr = Ipv4Addr::new(127, 0, 0, 1);
100108

101109
/// The node configuration parameters, implements a convenient [Default] for most common use.

0 commit comments

Comments
 (0)