Do not print result if ().

This commit is contained in:
Stephen Chung 2020-04-16 11:57:08 +08:00
parent 1ace4b474c
commit 090217e1cd

View File

@ -159,10 +159,11 @@ fn main() {
// Evaluate
engine.eval_ast_with_scope::<Dynamic>(&mut scope, &main_ast)
}) {
Ok(result) => {
Ok(result) if !result.is::<()>() => {
println!("=> {:?}", result);
println!();
}
Ok(_) => (),
Err(err) => {
println!();
print_error(&input, err);