From d42121c33bf36f284421bc76fd71195c52395ffb Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Mon, 17 Jun 2019 02:22:45 +0200 Subject: [PATCH] Update main.rs move stdout flush in Greedy-Search to after print statement --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 88843c6..efa6305 100644 --- a/src/main.rs +++ b/src/main.rs @@ -516,7 +516,6 @@ impl Router { )); seen.insert(start_sys.id); while !(queue.is_empty() || found) { - std::io::stdout().flush().unwrap(); while let Some((_, _, depth, sys)) = queue.pop() { if depth > maxd { maxd = depth; @@ -528,6 +527,7 @@ impl Router { seen.len(), ((seen.len() * 100) as f32) / total ); + std::io::stdout().flush().unwrap(); } if sys.id == goal_sys.id { found = true;