From e0f5f01e69743d3a41467339eda3ae9f42dea4a0 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 20 Feb 2017 01:45:45 -0800 Subject: [PATCH] Kill error messges for not using Result --- src/schala_lang/eval.rs | 1 + src/schala_lang/parser.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/schala_lang/eval.rs b/src/schala_lang/eval.rs index ff97feb..0f58a64 100644 --- a/src/schala_lang/eval.rs +++ b/src/schala_lang/eval.rs @@ -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) { diff --git a/src/schala_lang/parser.rs b/src/schala_lang/parser.rs index a5da526..a7138ff 100644 --- a/src/schala_lang/parser.rs +++ b/src/schala_lang/parser.rs @@ -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, " ]")