standard_directories/error.rs
1#[derive(Debug)]
2pub enum Error {
3 HomePath,
4}
5
6impl std::fmt::Display for Error {
7 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8 match self {
9 Error::HomePath => write!(
10 f,
11 "failed to find the home directory. try setting the $HOME environment variable."
12 ),
13 }
14 }
15}
16
17impl std::error::Error for Error {}