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
351 B
19 lines
351 B
use std::io;
|
|
|
|
#[derive(Debug)]
|
|
pub enum UnpackError {
|
|
Io(io::Error),
|
|
Parsing(String),
|
|
Unknown(String),
|
|
}
|
|
|
|
impl From<io::Error> for UnpackError {
|
|
fn from(e: io::Error) -> Self {
|
|
UnpackError::Io(e)
|
|
}
|
|
}
|
|
|
|
pub fn get_nom_error_reason(kind: nom::error::ErrorKind) -> String {
|
|
format!("{:?} {:?}", kind, kind.description())
|
|
}
|