diff --git a/libimagstore/src/hook/error.rs b/libimagstore/src/hook/error.rs index c491b83a..24740128 100644 --- a/libimagstore/src/hook/error.rs +++ b/libimagstore/src/hook/error.rs @@ -11,30 +11,6 @@ use std::convert::Into; pub enum HookErrorKind { HookExecutionError, AccessTypeViolation, - Pre(PreHookErrorKind), - Post(PostHookErrorKind) -} - -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum PreHookErrorKind { - // ... -} - -impl Into for PreHookErrorKind { - fn into(self) -> HookErrorKind { - HookErrorKind::Pre(self) - } -} - -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum PostHookErrorKind { - // ... -} - -impl Into for PostHookErrorKind { - fn into(self) -> HookErrorKind { - HookErrorKind::Post(self) - } } pub trait IntoHookError { @@ -58,38 +34,6 @@ impl Into for (HookErrorKind, Box) { } -impl Into for PreHookErrorKind { - - fn into(self) -> HookError { - HookError::new(HookErrorKind::Pre(self), None) - } - -} - -impl Into for (PreHookErrorKind, Box) { - - fn into(self) -> HookError { - HookError::new(HookErrorKind::Pre(self.0), Some(self.1)) - } - -} - -impl Into for PostHookErrorKind { - - fn into(self) -> HookError { - HookError::new(HookErrorKind::Post(self), None) - } - -} - -impl Into for (PostHookErrorKind, Box) { - - fn into(self) -> HookError { - HookError::new(HookErrorKind::Post(self.0), Some(self.1)) - } - -} - fn hook_error_type_as_str(e: &HookErrorKind) -> &'static str { match e { _ => "",