1
0
Fork 0

Clean up signatures (thanks tali)

This commit is contained in:
Vivianne 2022-12-02 12:13:22 -08:00
parent 1a967a5822
commit 1c5e2b26e5
1 changed files with 3 additions and 3 deletions

View File

@ -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.");