flush output before waiting for input in prompt_char_impl, fixes #103

This commit is contained in:
Carson McManus 2021-08-29 20:36:51 -04:00
parent bb6c733999
commit 6d2b10022e

View file

@ -81,6 +81,7 @@ fn prompt_char_impl(input: &mut impl Read, text: &str, chars: &str) -> char {
loop {
print!("{} [{}] ", text, chars);
let _ = std::io::stdout().flush();
let answer = input
.read_line()
.expect("Unable to read input")