Skip to content

env::Args and env::ArgsOs should implement ExactSizedIterator #22343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nagisa opened this issue Feb 14, 2015 · 2 comments
Closed

env::Args and env::ArgsOs should implement ExactSizedIterator #22343

nagisa opened this issue Feb 14, 2015 · 2 comments

Comments

@nagisa
Copy link
Member

nagisa commented Feb 14, 2015

And possibly RandomAccessIterator too.

If there is no issues with implementing it, I will gladly fix up a patch for it.

cc @aturon

@nagisa
Copy link
Member Author

nagisa commented Feb 14, 2015

By the way, motivation for this is the fact that we have a bunch of os::args().len() inside our codebase and without ExactSizeIterator there’s no good replacement for this.

@alexcrichton
Copy link
Member

I'd love to have this! (hurray adding impls backwards compatibly!).

Only catch is to ensure that this is implemented for both windows and unix, otherwise it should be pretty straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants