Add an owned string entry for CustomError.
This commit is contained in:
parent
acc29e7977
commit
8417b5fc9d
@ -6,6 +6,7 @@ pub(crate) type Res<T, U> = IResult<T, U, CustomError<T>>;
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum CustomError<I> {
|
pub enum CustomError<I> {
|
||||||
|
Text(String),
|
||||||
MyError(MyError<&'static str>),
|
MyError(MyError<&'static str>),
|
||||||
Nom(I, ErrorKind),
|
Nom(I, ErrorKind),
|
||||||
IO(std::io::Error),
|
IO(std::io::Error),
|
||||||
|
@ -402,6 +402,7 @@ impl<'s> From<CustomError<OrgSource<'s>>> for CustomError<&'s str> {
|
|||||||
CustomError::Nom(input, error_kind) => CustomError::Nom(input.into(), error_kind),
|
CustomError::Nom(input, error_kind) => CustomError::Nom(input.into(), error_kind),
|
||||||
CustomError::IO(err) => CustomError::IO(err),
|
CustomError::IO(err) => CustomError::IO(err),
|
||||||
CustomError::BoxedError(err) => CustomError::BoxedError(err),
|
CustomError::BoxedError(err) => CustomError::BoxedError(err),
|
||||||
|
CustomError::Text(err) => CustomError::Text(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user