summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryview/src/error.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-07 18:57:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-08 11:43:43 +0100
commit666193dfc26181b6606cb85de5389c4ed6ece5eb (patch)
tree6e5a8e08e5b204f202de335d412de3f69196ce12 /lib/entry/libimagentryview/src/error.rs
parente59df7655443f923984d3f4e2728adac0008a63f (diff)
Implement Into<anyhow::Error> for Error
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib/entry/libimagentryview/src/error.rs')
-rw-r--r--lib/entry/libimagentryview/src/error.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/entry/libimagentryview/src/error.rs b/lib/entry/libimagentryview/src/error.rs
index be887549..5f45d7a0 100644
--- a/lib/entry/libimagentryview/src/error.rs
+++ b/lib/entry/libimagentryview/src/error.rs
@@ -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,
+ }
+ }
+}
+