refac: rename io kind in error enum
This commit is contained in:
parent
f4539f7877
commit
b240db862d
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ pub enum Error {
|
||||||
RootNotFound,
|
RootNotFound,
|
||||||
MissedEnvVar(String),
|
MissedEnvVar(String),
|
||||||
|
|
||||||
IoError(io::Error),
|
Io(io::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Error {
|
impl fmt::Display for Error {
|
||||||
|
@ -22,7 +22,7 @@ impl fmt::Display for Error {
|
||||||
Error::MissedEnvVar(ref name) => {
|
Error::MissedEnvVar(ref name) => {
|
||||||
write!(fmt, r#"Missed "{}" environment variable"#, name)
|
write!(fmt, r#"Missed "{}" environment variable"#, name)
|
||||||
}
|
}
|
||||||
Error::IoError(ref error) => write!(fmt, "{}", error),
|
Error::Io(ref error) => write!(fmt, "{}", error),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ impl PartialEq for Error {
|
||||||
impl From<io::Error> for Error {
|
impl From<io::Error> for Error {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from(err: io::Error) -> Error {
|
fn from(err: io::Error) -> Error {
|
||||||
Error::IoError(err)
|
Error::Io(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue