~matthiasbeyer/imag

666193dfc26181b6606cb85de5389c4ed6ece5eb — Matthias Beyer 1 year, 1 month ago e59df76
Implement Into<anyhow::Error> for Error

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2 files changed, 10 insertions(+), 1 deletions(-)

M lib/entry/libimagentryview/src/error.rs
M lib/entry/libimagentryview/src/viewer.rs
M lib/entry/libimagentryview/src/error.rs => lib/entry/libimagentryview/src/error.rs +9 -0
@@ 46,3 46,12 @@ impl From<::anyhow::Error> for Error {
    }
}

impl Into<::anyhow::Error> for Error {
    fn into(self) -> ::anyhow::Error {
        match self {
            Error::Io(e)    => ::anyhow::Error::from(e),
            Error::Other(e) => e,
        }
    }
}


M lib/entry/libimagentryview/src/viewer.rs => lib/entry/libimagentryview/src/viewer.rs +1 -1
@@ 140,7 140,7 @@ impl<'a, I, V, W, F, T> Iterator for ViewIter<'a, I, V, W, F, T>
                        }
                    }

                    return Some(Err(Error::from(e)))
                    return Some(Err(e))
                }
            }