Skip to content

Commit

Permalink
Map Error::ConnectionClosed to ErrorKind::NotConnected
Browse files Browse the repository at this point in the history
  • Loading branch information
rmja committed Oct 24, 2023
1 parent 9a43ea6 commit eaeae5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl embedded_io::Error for Error {
fn kind(&self) -> embedded_io::ErrorKind {
match self {
Error::Network(kind) => *kind,
Error::ConnectionClosed => embedded_io::ErrorKind::NotConnected,
_ => embedded_io::ErrorKind::Other,
}
}
Expand Down

0 comments on commit eaeae5f

Please sign in to comment.