aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 78508ae4f70b26f7f85fd8cc5a45ad52b8e53824 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::str::Utf8Error;

pub enum Error {
    ReadError(std::io::Error),
    Utf8Error(Utf8Error),
    ParseError(String),
}

impl From<std::io::Error> for Error {
    fn from(e: std::io::Error) -> Self {
        Self::ReadError(e)
    }
}

impl From<Utf8Error> for Error {
    fn from(e: Utf8Error) -> Self {
        Self::Utf8Error(e)
    }
}