melib/error: add From<Infallible> impl

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/434/head
Manos Pitsidianakis 2 months ago
parent 386208664b
commit d1499242b2
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -604,6 +604,12 @@ impl From<io::ErrorKind> for ErrorKind {
}
}
impl From<std::convert::Infallible> for Error {
fn from(_: std::convert::Infallible) -> Self {
unreachable!()
}
}
impl From<io::Error> for Error {
fn from(err: io::Error) -> Self {
let s = err.to_string();

Loading…
Cancel
Save