Skip to content
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

Move iter_nth to style, add machine applicable suggestion #12417

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

Alexendoo
Copy link
Member

There's no O(n) involved with .iter().nth() on the linted types since the iterator implementations provide nth and/or advance_by that operate in O(1)

For slice iterators the codegen is equivalent, VecDeque's iterator seems to codegen differently but that doesn't seem significant enough to keep it as a perf lint

changelog: [iter_nth] Move to style

r? @flip1995

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 4, 2024
@flip1995
Copy link
Member

@bors r+

Makes sense. Thanks!

@bors
Copy link
Collaborator

bors commented Mar 12, 2024

📌 Commit 301d293 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 12, 2024

⌛ Testing commit 301d293 with merge a8a7371...

@bors
Copy link
Collaborator

bors commented Mar 12, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing a8a7371 to master...

@bors bors merged commit a8a7371 into rust-lang:master Mar 12, 2024
5 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants