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

Use append instead of extend(drain(..)) #129067

Merged
merged 2 commits into from
Aug 15, 2024
Merged

Use append instead of extend(drain(..)) #129067

merged 2 commits into from
Aug 15, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 13, 2024

The first commit adds IndexVec::append that forwards to Vec::append, and uses it in a couple places.

The second commit updates indexmap for its new IndexMap::append, and also uses that in a couple places.

These changes are similar to what clippy::extend_with_drain would suggest, just for other collection types.

@rustbot
Copy link
Collaborator

rustbot commented Aug 13, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 13, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 13, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@wesleywiser
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 14, 2024

📌 Commit ce67e68 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024)
 - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target)
 - rust-lang#128925 (derive(SmartPointer): register helper attributes)
 - rust-lang#128946 (Hash Ipv*Addr as an integer)
 - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout)
 - rust-lang#129015 (Update books)
 - rust-lang#129067 (Use `append` instead of `extend(drain(..))`)
 - rust-lang#129100 (Fix dependencies cron job)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024)
 - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target)
 - rust-lang#128925 (derive(SmartPointer): register helper attributes)
 - rust-lang#128946 (Hash Ipv*Addr as an integer)
 - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout)
 - rust-lang#129015 (Update books)
 - rust-lang#129067 (Use `append` instead of `extend(drain(..))`)
 - rust-lang#129100 (Fix dependencies cron job)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c582c0c into rust-lang:master Aug 15, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
Rollup merge of rust-lang#129067 - cuviper:append, r=wesleywiser

Use `append` instead of `extend(drain(..))`

The first commit adds `IndexVec::append` that forwards to `Vec::append`, and uses it in a couple places.

The second commit updates `indexmap` for its new `IndexMap::append`, and also uses that in a couple places.

These changes are similar to what [`clippy::extend_with_drain`](https://rust-lang.github.io/rust-clippy/master/index.html#/extend_with_drain) would suggest, just for other collection types.
@cuviper cuviper deleted the append branch September 4, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler 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