autoformatting
This commit is contained in:
parent
1b082b17bc
commit
50436d3463
|
@ -35,7 +35,7 @@ fn main() {
|
|||
}
|
||||
Err(Error::SyntaxError { incomplete_input: true, .. }) => {
|
||||
// continue reading input and append it to `line`
|
||||
line.push_str("\n"); // separate input lines
|
||||
line.push_str("\n"); // separate input lines
|
||||
prompt = ">> ";
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
12
src/error.rs
12
src/error.rs
|
@ -103,14 +103,22 @@ impl fmt::Display for Error {
|
|||
match *self {
|
||||
Error::SyntaxError { ref message, .. } => write!(fmt, "syntax error: {}", message),
|
||||
Error::RuntimeError(ref msg) => write!(fmt, "runtime error: {}", msg),
|
||||
Error::ToLuaConversionError { from, to, ref message } => {
|
||||
Error::ToLuaConversionError {
|
||||
from,
|
||||
to,
|
||||
ref message,
|
||||
} => {
|
||||
write!(fmt, "error converting {} to Lua {}", from, to)?;
|
||||
match *message {
|
||||
None => Ok(()),
|
||||
Some(ref message) => write!(fmt, " ({})", message),
|
||||
}
|
||||
}
|
||||
Error::FromLuaConversionError { from, to, ref message } => {
|
||||
Error::FromLuaConversionError {
|
||||
from,
|
||||
to,
|
||||
ref message,
|
||||
} => {
|
||||
write!(fmt, "error converting Lua {} to {}", from, to)?;
|
||||
match *message {
|
||||
None => Ok(()),
|
||||
|
|
Loading…
Reference in New Issue