Update interpreter.rs

This commit is contained in:
mrMiiao 2022-08-11 16:30:49 +03:00 committed by GitHub
parent 4ce6784b08
commit 5a0189b6ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,8 +219,8 @@ impl Interpreter {
fn input(&self, value: &String) -> Value {
let mut input = String::new();
print!("{}", value);
io::stdout().flush().unwrap_or_default();
io::stdin().read_line(&mut input).unwrap_or_default();
io::stdout().flush().expect("Couldn't flush Stdout");
io::stdin().read_line(&mut input).expect("Couldn't read from Stdin");
Value::String(input.trim_end().to_string())
}