Move main to better spot
This commit is contained in:
parent
8bc501a4f5
commit
916e8e1b6f
|
@ -116,20 +116,7 @@ mod parsing {
|
|||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let filename = "etc/p07.txt";
|
||||
let file = fs::File::open(filename).expect("Can't open file");
|
||||
let lines: Vec<String> = io::BufReader::new(file)
|
||||
.by_ref()
|
||||
.lines()
|
||||
.flatten()
|
||||
.collect();
|
||||
|
||||
println!("PART ONE ---------------");
|
||||
part1(&lines);
|
||||
println!("\n PART TWO ---------------");
|
||||
part2(&lines);
|
||||
}
|
||||
|
||||
use parsing::{line, Command, Line, Listing};
|
||||
use path_clean::clean;
|
||||
|
@ -280,6 +267,21 @@ impl State {
|
|||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let filename = "etc/p07.txt";
|
||||
let file = fs::File::open(filename).expect("Can't open file");
|
||||
let lines: Vec<String> = io::BufReader::new(file)
|
||||
.by_ref()
|
||||
.lines()
|
||||
.flatten()
|
||||
.collect();
|
||||
|
||||
println!("PART ONE ---------------");
|
||||
part1(&lines);
|
||||
println!("\n PART TWO ---------------");
|
||||
part2(&lines);
|
||||
}
|
||||
|
||||
fn part1(lines: &[String]) {
|
||||
let mut state = State::new();
|
||||
|
||||
|
|
Loading…
Reference in New Issue