aboutsummaryrefslogtreecommitdiffstats
path: root/bytecode/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bytecode/src/main.rs')
-rw-r--r--bytecode/src/main.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/bytecode/src/main.rs b/bytecode/src/main.rs
index 683ff26..8315d5a 100644
--- a/bytecode/src/main.rs
+++ b/bytecode/src/main.rs
@@ -3,12 +3,8 @@ mod data;
mod encoding;
mod heap;
-use std::io::Read;
-
fn main() {
- let mut buf = Vec::new();
- std::io::stdin().lock().read_to_end(&mut buf).unwrap();
- let prog = encoding::decode(&buf).unwrap();
+ let prog = encoding::decode(&mut std::io::stdin().lock()).unwrap();
let exit_code = bytecode::eval(&prog).unwrap();
std::process::exit(i32::from(exit_code));
}