full_stop/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5    #[error(transparent)]
6    Ignore(#[from] ignore::Error),
7    #[error(transparent)]
8    GlobPattern(#[from] glob::PatternError),
9    #[error(transparent)]
10    Glob(#[from] glob::GlobError),
11    #[error(transparent)]
12    ShellExpandLookup(#[from] shellexpand::LookupError<Box<Error>>),
13    #[error(transparent)]
14    Io(#[from] std::io::Error),
15    #[error(transparent)]
16    SerializeToml(#[from] toml::ser::Error),
17    #[error(transparent)]
18    DeserializeToml(#[from] toml::de::Error),
19}
20
21impl From<shellexpand::LookupError<Error>> for Error {
22    fn from(error: shellexpand::LookupError<Error>) -> Self {
23        Self::ShellExpandLookup(shellexpand::LookupError {
24            var_name: error.var_name,
25            cause: Box::new(error.cause),
26        })
27    }
28}