Prepare for 3!
This commit is contained in:
parent
1c5e2b26e5
commit
ffe2432af5
2 changed files with 27 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
name = "aoc-vv"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
default-run = "p02"
|
||||
default-run = "p03"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
26
src/bin/p03.rs
Normal file
26
src/bin/p03.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
use std::fs;
|
||||
use std::io::{self, BufRead, Read, Seek};
|
||||
|
||||
fn main() {
|
||||
let filename = "etc/p03.txt";
|
||||
let file = fs::File::open(filename).expect("Can't open file");
|
||||
let mut reader = io::BufReader::new(file);
|
||||
|
||||
println!("PART ONE ---------------");
|
||||
part1(reader.by_ref().lines());
|
||||
reader.rewind().expect("Can't rewind");
|
||||
|
||||
println!("\n PART TWO ---------------");
|
||||
part2(reader.lines());
|
||||
}
|
||||
|
||||
fn part1(lines: impl Iterator<Item = std::io::Result<String>>) {
|
||||
}
|
||||
|
||||
fn part2(lines: impl Iterator<Item = std::io::Result<String>>) {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
}
|
Loading…
Reference in a new issue