Merge pull request #432 from matthiasbeyer/libimagerror/simple-into
libimagerror: Impl Into<error name> for all <errorkindname>
This commit is contained in:
commit
f19c057258
2 changed files with 8 additions and 8 deletions
|
@ -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> {
|
||||
|
|
|
@ -11,14 +11,6 @@ pub trait IntoHookError {
|
|||
fn into_hookerror_with_cause(self, cause: Box<Error>) -> HookError;
|
||||
}
|
||||
|
||||
impl Into<HookError> for HookErrorKind {
|
||||
|
||||
fn into(self) -> HookError {
|
||||
HookError::new(self, None)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Into<HookError> for (HookErrorKind, Box<Error>) {
|
||||
|
||||
fn into(self) -> HookError {
|
||||
|
|
Loading…
Reference in a new issue