more prep
This commit is contained in:
31
01/main.rs
Normal file
31
01/main.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
#![allow(dead_code)]
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::BufRead;
|
||||
use std::path::Path;
|
||||
use std::time::Instant;
|
||||
|
||||
fn main() {
|
||||
let now = Instant::now();
|
||||
part_one();
|
||||
let part_one_duration = now.elapsed();
|
||||
part_two();
|
||||
let part_two_duration = now.elapsed();
|
||||
println!(
|
||||
"p1: {}ms, p2: {}ms",
|
||||
part_one_duration.as_millis(),
|
||||
part_two_duration.as_millis()
|
||||
);
|
||||
}
|
||||
|
||||
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
let file = File::open(filename)?;
|
||||
Ok(io::BufReader::new(file).lines())
|
||||
}
|
||||
|
||||
fn part_one() {}
|
||||
|
||||
fn part_two() {}
|
Reference in New Issue
Block a user