You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
355 B
19 lines
355 B
use nom::Err::{Error as NomError, Failure as NomFailure};
|
|
|
|
pub enum ParseError {
|
|
Error(NomError),
|
|
Failure(NomFailure),
|
|
}
|
|
|
|
impl From<NomError> for ParseError {
|
|
fn from(e: NomError) -> Self {
|
|
ParseError::Error(e)
|
|
}
|
|
}
|
|
|
|
impl From<NomFailure> for ParseError {
|
|
fn from(e: NomFailure) -> Self {
|
|
ParseError::Failure(e)
|
|
}
|
|
}
|