In the code, I'm trying to turn a number like 101
into 111000111
. I first have some code to split up the number and triple the digit. However, when I tried to iterate over vector composed of each number ([1,0,1]
), I get this error:
value of type `&mut Vec<u32>` cannot be built from `std::iter::Iterator<Item=u32>
This is confusing, because this line previously worked - .collect() ran with zero issues, and the assert_eq! macro provides no panic or error messages. What am I missing? Is the loop doing something weird to my vector?