Clean up signatures (thanks tali)
This commit is contained in:
parent
1a967a5822
commit
1c5e2b26e5
|
@ -88,10 +88,10 @@ fn main() {
|
|||
reader.rewind().expect("Can't rewind");
|
||||
|
||||
println!("\n PART TWO ---------------");
|
||||
part2(reader.by_ref().lines());
|
||||
part2(reader.lines());
|
||||
}
|
||||
|
||||
fn part1(lines: std::io::Lines<&mut io::BufReader<fs::File>>) {
|
||||
fn part1(lines: impl Iterator<Item = std::io::Result<String>>) {
|
||||
let mut total_score: u32 = 0;
|
||||
for l in lines {
|
||||
let line = l.expect("Can't read line.");
|
||||
|
@ -118,7 +118,7 @@ fn part1(lines: std::io::Lines<&mut io::BufReader<fs::File>>) {
|
|||
println!("Total score is {}", total_score);
|
||||
}
|
||||
|
||||
fn part2(lines: std::io::Lines<&mut io::BufReader<fs::File>>) {
|
||||
fn part2(lines: impl Iterator<Item = std::io::Result<String>>) {
|
||||
let mut total_score: u32 = 0;
|
||||
for l in lines {
|
||||
let line = l.expect("Can't read line.");
|
||||
|
|
Loading…
Reference in New Issue