diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-03-07 18:57:42 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-03-08 11:43:43 +0100 |
commit | 666193dfc26181b6606cb85de5389c4ed6ece5eb (patch) | |
tree | 6e5a8e08e5b204f202de335d412de3f69196ce12 /lib/entry/libimagentryview/src/error.rs | |
parent | e59df7655443f923984d3f4e2728adac0008a63f (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.rs | 9 |
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, + } + } +} + |