summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-store/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-09-03 13:53:55 +0200
committerMatthias Beyer <mail@beyermatthias.de>2017-09-03 15:42:06 +0200
commit603808a9faba93bc1dea8a5004ffc402e2630a5d (patch)
tree1b0f0ea3718854fa54ad1c309383c32747cf7e79 /bin/core/imag-store/src
parent9713a4632ca2c52af4fab392bd6c479b4ac7db1a (diff)
Impl IntoError for error kinds
Diffstat (limited to 'bin/core/imag-store/src')
-rw-r--r--bin/core/imag-store/src/error.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/core/imag-store/src/error.rs b/bin/core/imag-store/src/error.rs
index d74e4a30..163ae344 100644
--- a/bin/core/imag-store/src/error.rs
+++ b/bin/core/imag-store/src/error.rs
@@ -39,3 +39,14 @@ error_chain! {
pub use self::error::StoreError;
pub use self::error::StoreErrorKind;
+impl IntoError for StoreErrorKind {
+ type Target = StoreError;
+
+ fn into_error(self) -> Self::Target {
+ StoreError::from_kind(self)
+ }
+
+ fn into_error_with_cause(self, cause: Box<Error>) -> Self::Target {
+ StoreError::from_kind(self)
+ }
+}