Macroquad expandable 2d collision detection

Right, that's the first option. The Rust book has a chapter on using Vec, and in general is a really good source, but it doesn't specifically call out that when you iterate over a collection with for item in &collection that the item is a reference to the item, so on this case a Vec<Rectangle> will give you &Rectangle, so you can pass it directly to your collision function.

There's dozens of little footnotes you can bump into (what happens if you just for item in collection without the &, for example), but in general, if you read the error messages you should start to get an idea on what's going on.

If you get stuck, feel free to ask more questions!