11 lines
368 B
Rust
11 lines
368 B
Rust
use crate::intcode::IntCode;
|
|
use std::io::BufRead;
|
|
|
|
pub fn part1<F: BufRead> (mut input: F) {
|
|
let mut buf = String::new();
|
|
let _num_bytes = input.read_line(&mut buf).expect("Unable to first read line of input file");
|
|
let mut intcode = IntCode::from_str(&buf);
|
|
println!("Input value `1` for part 1 and `5` for part 2:");
|
|
let _res = intcode.run();
|
|
}
|