Skip to content

Delegate to inner vec::IntoIter from env::ArgsOs #139847

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaliaarchi
Copy link
Contributor

@thaliaarchi thaliaarchi commented Apr 15, 2025

Delegate from env::ArgsOs to any methods which vec::IntoIter provides in traits. Since env::ArgsOs performs UTF-8 validation, it cannot benefit from this, as even skipped args should still be validated. Add #[inline] for any methods which simply wrap the inner iterator.

Delegate from `env::ArgsOs` to any methods which `vec::IntoIter`
provides in traits. Since `env::ArgsOs` performs UTF-8 validation, it
cannot benefit from this, as even skipped args should still be
validated. Add `#[inline]` for any methods which simply wrap the inner
iterator.
@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2025

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 15, 2025
@thaliaarchi thaliaarchi force-pushed the args/delegate-iter branch 2 times, most recently from 3a60980 to b63849b Compare April 15, 2025 06:08
thaliaarchi added a commit to thaliaarchi/rust that referenced this pull request Apr 15, 2025
The zkVM implementation of `env::ArgsOs` reports the full length even
after having iterated once, which is incorrect. Instead, use a double
cursor approach which works out to be simpler. Also, implement more
iterator methods like the other platforms in rust-lang#139847.
thaliaarchi added a commit to thaliaarchi/rust that referenced this pull request Apr 15, 2025
The zkVM implementation of `env::ArgsOs` incorrectly reports the full
length even after having iterated. Instead, use a range approach which
works out to be simpler. Also, implement more iterator methods like the
other platforms in rust-lang#139847.
thaliaarchi added a commit to thaliaarchi/rust that referenced this pull request Apr 15, 2025
The zkVM implementation of `env::ArgsOs` incorrectly reports the full
length even after having iterated. Instead, use a range approach which
works out to be simpler. Also, implement more iterator methods like the
other platforms in rust-lang#139847.
@bors
Copy link
Collaborator

bors commented Apr 25, 2025

☔ The latest upstream changes (presumably #140282) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants