3 ms·
I've never run into this because I always write out my `.iter()`s and `.into_iter()`, but this is why I don't think loops should accept `IntoIterator` types, ju
by 3836293648 4y ago
I've never run into this because I always write out my `.iter()`s and `.into_iter()`, but this is why I don't think loops should accept `IntoIterator` types, just actual `Iterator`s so you're forced to type it out
- tialaramex 4y agoThis just adds verbosity - there's a blanket implementation of IntoIterator on Iterator so people would just learn to write for x in y.into_iter() and presumably curse 3836293648 who made them do this extra typing for no purpose. It doesn't, as you seem to imply fix the parent's problem, because both the container they thought they were getting, and the Option or Result they were actually getting, implement IntoIterator so they'll call into_iter() on it.