Don't print newline for empty REPL result

This commit is contained in:
greg 2015-08-10 13:39:53 -07:00
parent b080ea7c81
commit eb5ce2ef9e

View File

@ -91,7 +91,9 @@ fn repl() {
} }
let (eval, new_env) = evaluate(ast, env); let (eval, new_env) = evaluate(ast, env);
println!("{}", eval); if !eval.is_empty() {
println!("{}", eval);
}
env = new_env; env = new_env;
}, },
Err(err) => println!("Error: {}", err) Err(err) => println!("Error: {}", err)