Closed Kilobyte22 closed 8 years ago
IIRC such a trait requires higher kinded types, which is why we don't have it yet.=
Actually, that does sound quite reasonable, didn't think of that. We'll see what the future brings and hopefully soon this will be possible
See also #17
Ah, okay i did search for this kind of thing, but didn't see #17.
See also the approved RFC 235.
I believe this was done via IntoIterator
, so closing.
Currently when we want to iterate over an Array we always have to call .iter() on that array. I suggest that there should be a trait to standardize this:
Now, rustc would check in for loops for instances of Iterable and automatically adding a .iter(). This would allow for code like this:
The old way would obviously still work, this would only be syntactic sugar