From 89482e5b5a76e721dae136018ff53afb046bb520 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 1 Oct 2017 19:31:43 -0700 Subject: [PATCH] Use a Result --- src/schala_lang/eval.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/schala_lang/eval.rs b/src/schala_lang/eval.rs index e3fc3b4..bb300b0 100644 --- a/src/schala_lang/eval.rs +++ b/src/schala_lang/eval.rs @@ -50,13 +50,12 @@ impl ReplState { Float(f) => Some(format!("{}", f)), Str(s) => Some(format!("\"{}\"", s)), Bool(b) => Some(format!("{}", b)), - _ => None, + Other => None, } }) }, Statement::Declaration(decl) => { - self.eval_decl(decl); - Ok(None) + self.eval_decl(decl).map(|_| None) } } }