mirror of
https://github.com/artegoser/ONLang
synced 2024-12-23 01:23:46 +03:00
Update interpreter.rs
This commit is contained in:
parent
4ce6784b08
commit
5a0189b6ae
1 changed files with 2 additions and 2 deletions
|
@ -219,8 +219,8 @@ impl Interpreter {
|
||||||
fn input(&self, value: &String) -> Value {
|
fn input(&self, value: &String) -> Value {
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
print!("{}", value);
|
print!("{}", value);
|
||||||
io::stdout().flush().unwrap_or_default();
|
io::stdout().flush().expect("Couldn't flush Stdout");
|
||||||
io::stdin().read_line(&mut input).unwrap_or_default();
|
io::stdin().read_line(&mut input).expect("Couldn't read from Stdin");
|
||||||
Value::String(input.trim_end().to_string())
|
Value::String(input.trim_end().to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue