forked from AbleScript/ablescript
Changed error variant name to go by conventions
This commit is contained in:
parent
b677960013
commit
8c9e49a7c4
|
@ -17,7 +17,7 @@ pub enum ErrorKind {
|
||||||
BfInterpretError(InterpretError),
|
BfInterpretError(InterpretError),
|
||||||
MismatchedArgumentError,
|
MismatchedArgumentError,
|
||||||
MissingLhs,
|
MissingLhs,
|
||||||
IOError(io::Error),
|
IoError(io::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error {
|
impl Error {
|
||||||
|
@ -56,13 +56,13 @@ impl Display for ErrorKind {
|
||||||
// TODO: give concrete numbers here.
|
// TODO: give concrete numbers here.
|
||||||
ErrorKind::MismatchedArgumentError => write!(f, "wrong number of function arguments"),
|
ErrorKind::MismatchedArgumentError => write!(f, "wrong number of function arguments"),
|
||||||
ErrorKind::MissingLhs => write!(f, "missing expression before binary operation"),
|
ErrorKind::MissingLhs => write!(f, "missing expression before binary operation"),
|
||||||
ErrorKind::IOError(err) => write!(f, "I/O error: {}", err),
|
ErrorKind::IoError(err) => write!(f, "I/O error: {}", err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<io::Error> for ErrorKind {
|
impl From<io::Error> for ErrorKind {
|
||||||
fn from(e: io::Error) -> Self {
|
fn from(e: io::Error) -> Self {
|
||||||
Self::IOError(e)
|
Self::IoError(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue