Day 6 done.

This was a funky one. Pretty easy for part 1. Just trimming, splitting, and parsing all the numbers and operators and grouping them columnwise. Nothing too hard.

Part 2 was awkward. I always am a bit flustered when I have to go back and parse the input differently, especially because I build things around FromStr in Rust, so I have to do either a Part2Input for the second part or a separate parsing function. This one was fiddly because I tried to parse it into the same Input structure as before, but that didn't work because not all the equations had the same quantity of numbers this time. I also wanted to do some sort of zip that let me zip over an iterator of iterators, but I couldn't find a good way of zipping a dynamic number of iterators, even in itertools (it has multizip, but that only works on a compiletime number of iterators). In the end, I needed to do this awkward loop:

number_buffer.clear(); for number_line_iterator in &mut number_line_iterators { match number_line_iterator.next() { Some(digit) => number_buffer.push(digit), None => { equations.push(Equation { numbers: numbers, operator: operators.next().unwrap(), }); break 'outer; } } }

Not the prettiest, but it did get the job done.

#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day6 #AdventOfCode2025Day06 #Day6 #Day06 #Rust #RustLang #Programming #codingchallenges

2025/src/bin/day06.rs at 97c43689669280b9dba965a83161593c59a28928527c261d127911b5d68bad0d

2025

AxFive