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 // Evaluate
engine.eval_ast_with_scope::<Dynamic>(&mut scope, &main_ast) engine.eval_ast_with_scope::<Dynamic>(&mut scope, &main_ast)
}) { }) {
Ok(result) => { Ok(result) if !result.is::<()>() => {
println!("=> {:?}", result); println!("=> {:?}", result);
println!(); println!();
} }
Ok(_) => (),
Err(err) => { Err(err) => {
println!(); println!();
print_error(&input, err); print_error(&input, err);