Why "my_vec.into_iter().map()" instead of "my_vec.map()"?
I recently found myself doing x.into_iter().map(...).collect() a lot in a project and so wrote an extension method so i could just do x.map_collect(...). That got me thinking, what's the design reasoning behind needing to explicitly write .iter()?
Would there have been a problem with having my_vec.map(...) instead of my_vec.into_iter().map(...)? Where map is blanket implemented for IntoIterator.
If you wanted my_vec.iter().map(...) you could write (&my_vec).map(...) or something like my_vec.ref().map(...), and similar for iter_mut().
Am I missing something?
Tangentially related, is there a reason .collect() is a separate thing from .into()?