From 81c0a9e170893e747f4780fa0ea47bf0725e42b6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 22 Jul 2016 15:49:57 +0200 Subject: [PATCH] Impl From for HookError --- libimagstorestdhook/src/vcs/git/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libimagstorestdhook/src/vcs/git/error.rs b/libimagstorestdhook/src/vcs/git/error.rs index 4b4daf96..0af7b0ab 100644 --- a/libimagstorestdhook/src/vcs/git/error.rs +++ b/libimagstorestdhook/src/vcs/git/error.rs @@ -33,6 +33,14 @@ impl GitHookError { } +impl From for HE { + + fn from(he: GitHookError) -> HE { + HE::new(HEK::HookExecutionError, Some(Box::new(he))) + } + +} + pub use self::error::GitHookError; pub use self::error::GitHookErrorKind; pub use self::error::MapErrInto;