flush output before waiting for input in prompt_char_impl, fixes #103
This commit is contained in:
parent
bb6c733999
commit
6d2b10022e
1 changed files with 1 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue