You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently wanted to pass std::env::args().skip(1) to a child process. So I did std::env::args().skip(1).collect::<Vec<_>>(). Maybe there should be an easier way to pass in iterators?
The text was updated successfully, but these errors were encountered:
Out of curiosity, what exactly is the advantage of using IntoIterator over Iterator here?
Usually, Iterator is implemented by a specialized iterator types, for example std::vec::Iter or std::collections::hash_map::Keys. Vec and HashMap themselves instead implement IntoIterator to return an iterator.
I recently wanted to pass
std::env::args().skip(1)
to a child process. So I didstd::env::args().skip(1).collect::<Vec<_>>()
. Maybe there should be an easier way to pass in iterators?The text was updated successfully, but these errors were encountered: