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

Refactor/fix clippy lints #15615

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

shogo-nakano-desu
Copy link
Contributor

As title says.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2023
@@ -533,7 +535,7 @@ impl CargoActor {
}

enum CargoMessage {
CompilerArtifact(cargo_metadata::Artifact),
CompilerArtifact(Box<cargo_metadata::Artifact>),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last time this came up (can't find the PR, though), it was pointed out that this is the most common variant, so boxing the contents will cause almost every instance to incur an allocation.

I don't know if this overhead will be larger than the speed-up obtained from the faster moves. Either way, I suspect it doesn't matter too much compared to the whole cargo check invocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. I will keep it in my mind. Thank you for your review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lnicola I have removed Box in
dd84306 . Thanks

@Veykril
Copy link
Member

Veykril commented Sep 22, 2023

Thanks!
@bors r+
On that note, I believe the lints section in Cargo.toml has been set for stabilization now, rust-lang/cargo#12115 so we can soon enable clippy in general.

@bors
Copy link
Contributor

bors commented Sep 22, 2023

📌 Commit dd84306 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 22, 2023

⌛ Testing commit dd84306 with merge 11ffcc0...

@bors
Copy link
Contributor

bors commented Sep 22, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 11ffcc0 to master...

@bors bors merged commit 11ffcc0 into rust-lang:master Sep 22, 2023
9 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.

5 participants