Need to modify src/main.rs to return contents as a vector of string slices. This will require modification of all puzzles to date, so better sooner than later. This should also remove the last trailing newline or blank item.
Can't think of an AoC problem where working line by line from a text file wasn't a reasonable place to start. There was one last year where we were given a very simple string to start with (ended up with a gigantic number, maybe day 6?) and even then, it's just a single-element vector.
Example of redundancy: https://github.com/blairfrandeen/2022-AoC/blob/ff28f2615a8a9986d68be9e67e6a4784a6a474f0/src/day_4.rs#L8
Need to modify
src/main.rs
to returncontents
as a vector of string slices. This will require modification of all puzzles to date, so better sooner than later. This should also remove the last trailing newline or blank item.Can't think of an AoC problem where working line by line from a text file wasn't a reasonable place to start. There was one last year where we were given a very simple string to start with (ended up with a gigantic number, maybe day 6?) and even then, it's just a single-element vector.