summaryrefslogtreecommitdiffstats
path: root/src/parse_error.rs
blob: 8d06969836b4a82484a5eee883136424871a86e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug)]
pub enum ParseError {
    ParseIntError(std::num::ParseIntError),
    ParseRangeError(crate::errors::ParseRangeError),
}

impl ToString for ParseError {
    fn to_string(&self) -> String {
        match self {
            ParseError::ParseIntError(e) => e.to_string(),
            ParseError::ParseRangeError(e) => e.to_string(),
        }
    }
}