Advent of Code 2019 - Problem 10


I am using this time at home to solve the advent code puzzles using rust in order to learn a bit more about rust.

So I solved The 10th problem of the Advent of Code 2019 using an iterator that loops over the visible astroids. At first I tried to loop over the possible paths, but I got bitten by the "borrow of moved value" because I looped over the map and then used the map to make a .contains check. I ended up using the map to create the iterator (and thus I had to use lifetime for the first time … I still have to read about that).

I also wonder if this is idiomatic rust.

I welcome any remarks :slight_smile:.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.