Kill error messges for not using Result

This commit is contained in:
greg 2017-02-20 01:45:45 -08:00
parent 424998c128
commit e0f5f01e69
2 changed files with 4 additions and 3 deletions

View File

@ -79,6 +79,7 @@ impl<'a> Evaluator<'a> {
ast.into_iter()
.map(|astnode| format!("{}", self.reduction_loop(astnode)))
.collect()
}
fn add_binding(&mut self, var: String, value: ReducedValue) {

View File

@ -94,12 +94,12 @@ impl fmt::Display for Expression {
write!(f, "«function: {}, {} arg(s)»", name, parameters.len())
}
ListLiteral(ref items) => {
write!(f, "[ ");
write!(f, "[ ")?;
let mut iter = items.iter().peekable();
while let Some(item) = iter.next() {
write!(f, "{}", item);
write!(f, "{}", item)?;
if let Some(_) = iter.peek() {
write!(f, ", ");
write!(f, ", ")?;
}
}
write!(f, " ]")