summaryrefslogtreecommitdiffstats
path: root/src/parse_error.rs
blob: b49b4430d70ab49c46a5f12f9c940bcb6b39c794 (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::error::ParseRangeError),
}

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