From b1f43e3ef53500c4931a97147d238c2ae70673b7 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 23 May 2016 22:00:50 +0200 Subject: [PATCH] Impl Into for all --- libimagerror/src/error_gen.rs | 8 ++++++++ libimagstore/src/hook/error.rs | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libimagerror/src/error_gen.rs b/libimagerror/src/error_gen.rs index c715eb13..9511c988 100644 --- a/libimagerror/src/error_gen.rs +++ b/libimagerror/src/error_gen.rs @@ -82,6 +82,14 @@ macro_rules! generate_custom_error_types { } + impl Into<$name> for $kindname { + + fn into(self) -> $name { + $name::new(self, None) + } + + } + impl Display for $name { fn fmt(&self, fmt: &mut Formatter) -> Result<(), FmtError> { diff --git a/libimagstore/src/hook/error.rs b/libimagstore/src/hook/error.rs index e55c2b8f..472dc142 100644 --- a/libimagstore/src/hook/error.rs +++ b/libimagstore/src/hook/error.rs @@ -11,14 +11,6 @@ pub trait IntoHookError { fn into_hookerror_with_cause(self, cause: Box) -> HookError; } -impl Into for HookErrorKind { - - fn into(self) -> HookError { - HookError::new(self, None) - } - -} - impl Into for (HookErrorKind, Box) { fn into(self) -> HookError {