In this lesson we take a look at Arrays and the different ways of creating them. Arrays in Rust are collections of values of the same type that cannot change in size. In other words, the number of fields (or elements) has to be known at compile time.
for number in &numbers {
Why did you use a reference to the array?
When I try it without the ampersand, I get a compile error that the array is not an iterator.
This needs a blog post. I'll put one together and post it here once done.
Is the blog up? I have the same question.
Hey Anthony,
unfortunately I didn't get to writing it yet. Life happened, ha. But thanks for the reminder!
hi Pascal, is the blog finished ? is that &names for leaving the ownership in the array ? or it is for performance ?