1
0
Fork 0

Prepare for 3!

This commit is contained in:
Vivianne 2022-12-02 20:48:30 -08:00
parent 1c5e2b26e5
commit ffe2432af5
2 changed files with 27 additions and 1 deletions

View File

@ -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
View 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::*;
}