From eb5ce2ef9ebb626a4e540b1538cd12136b837071 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 10 Aug 2015 13:39:53 -0700 Subject: [PATCH] Don't print newline for empty REPL result --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1da952a..020a55e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,7 +91,9 @@ fn repl() { } let (eval, new_env) = evaluate(ast, env); - println!("{}", eval); + if !eval.is_empty() { + println!("{}", eval); + } env = new_env; }, Err(err) => println!("Error: {}", err)