See: https://adventofcode.com/2022
- https://docs.rs/inpt/latest/inpt/
- Bit operators:
I often have problems with this iterator.
Collecting into a Vec
can help. Then you can use slice iterators,
which tend to be more forgiving.
.lines()
[what is inbetween—probably one or more `map(…)`]
.collect::<Vec<u32>>();
[…]
.lines()
.map(|s| s.parse::<u32>().expect("not an integer"));
I wasn’t happy with my approach to parsing so I asked someone.