From 9e8ef57f72a28b3395524715393a7a31b2bf3810 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 4 Mar 2016 21:41:04 +0100 Subject: [PATCH] Remove {Pre, Post}HookErrorKind types as they are not needed anymore --- libimagstore/src/hook/error.rs | 56 ---------------------------------- 1 file changed, 56 deletions(-) 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 { _ => "",