Skip to content

Commit 0984ea4

Browse files
author
Anonymous
committed
Implement std::error::Error for SocketParseError
SocketParseError does not implement std Error which means it can't be used in standard ways like combining ? and anyhow. This commit implements std::error::Error for SocketParseError Hide the std::error::Error for SocketAddressParseError implementation behind the "std" feature since it relies on the standard library.
1 parent 8aae34e commit 0984ea4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/ln/msgs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,9 @@ impl fmt::Display for SocketAddressParseError {
10781078
}
10791079
}
10801080

1081+
#[cfg(feature = "std")]
1082+
impl std::error::Error for SocketAddressParseError {}
1083+
10811084
#[cfg(feature = "std")]
10821085
impl From<std::net::SocketAddrV4> for SocketAddress {
10831086
fn from(addr: std::net::SocketAddrV4) -> Self {

0 commit comments

Comments
 (0)