From b0655d7cab949588070faed37d26fd965abb39d4 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 11 Jan 2017 22:32:12 -0800 Subject: [PATCH] need to flush stdout for printing --- src/eval.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eval.rs b/src/eval.rs index 57f9a55..24e274c 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -160,6 +160,10 @@ impl<'a> Evaluator<'a> { match side_effect { Print(s) => { write!(self.stdout, "{}\n", s).unwrap(); + match self.stdout.flush() { + Ok(_) => (), + Err(_) => println!("Could not flush stdout"), + }; } AddBinding(var, value) => { self.add_binding((*var).clone(), value);