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() ast.into_iter()
.map(|astnode| format!("{}", self.reduction_loop(astnode))) .map(|astnode| format!("{}", self.reduction_loop(astnode)))
.collect() .collect()
} }
fn add_binding(&mut self, var: String, value: ReducedValue) { 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()) write!(f, "«function: {}, {} arg(s)»", name, parameters.len())
} }
ListLiteral(ref items) => { ListLiteral(ref items) => {
write!(f, "[ "); write!(f, "[ ")?;
let mut iter = items.iter().peekable(); let mut iter = items.iter().peekable();
while let Some(item) = iter.next() { while let Some(item) = iter.next() {
write!(f, "{}", item); write!(f, "{}", item)?;
if let Some(_) = iter.peek() { if let Some(_) = iter.peek() {
write!(f, ", "); write!(f, ", ")?;
} }
} }
write!(f, " ]") write!(f, " ]")