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

Clean up code mostly based on clippy suggestions #7911

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

aleksator
Copy link
Contributor

No description provided.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 20, 2020
@bors
Copy link
Collaborator

bors commented Feb 20, 2020

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

https://doc.rust-lang.org/cargo/reference/features.html"
)),
_ => (),
Cfg::KeyPair(name, _) => if let "feature" = name.as_str() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be if name.as_str() == "feature"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can indeed, changed!

@@ -208,7 +208,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes

// Be sure to pass along all enabled features for this package, this is the
// last piece of statically known information that we have.
for feat in &unit.features {
for &feat in &unit.features {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain these changes to add &? It looks more confusing to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The IDE suggested that there's double reference in one of those variables (like &&str), so adding & helps avoiding it. Then I looked for similar patterns and changed them as well.

On the second thought it's not very important, so I have removed that commit.

@aleksator aleksator force-pushed the run_through_clippy branch 2 times, most recently from 0c035c3 to 511a704 Compare February 20, 2020 21:38
@aleksator aleksator requested a review from ehuss February 20, 2020 21:44
https://doc.rust-lang.org/cargo/reference/features.html"
)),
_ => (),
Cfg::KeyPair(name, _) => if name.as_str() == "feature"{

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, I wonder why doesn't rustfmt catch this. Thank you, I've added the missing space.

@ehuss
Copy link
Contributor

ehuss commented Feb 20, 2020

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Feb 20, 2020

📌 Commit 2b1dc3e has been approved by ehuss

@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 Feb 20, 2020
@bors
Copy link
Collaborator

bors commented Feb 20, 2020

⌛ Testing commit 2b1dc3e with merge d21ef5d05a010f55cf6ecaad455168cb4bee6736...

@bors
Copy link
Collaborator

bors commented Feb 20, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 20, 2020
@ehuss
Copy link
Contributor

ehuss commented Feb 21, 2020

@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 Feb 21, 2020
@bors
Copy link
Collaborator

bors commented Feb 21, 2020

⌛ Testing commit 2b1dc3e with merge abc8463...

@bors
Copy link
Collaborator

bors commented Feb 21, 2020

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing abc8463 to master...

@bors bors merged commit abc8463 into rust-lang:master Feb 21, 2020
@aleksator aleksator deleted the run_through_clippy branch February 21, 2020 08:34
bors added a commit to rust-lang/rust that referenced this pull request Feb 22, 2020
Update cargo

11 commits in e02974078a692d7484f510eaec0e88d1b6cc0203..e57bd02999c9f40d52116e0beca7d1dccb0643de
2020-02-18 15:24:43 +0000 to 2020-02-21 20:20:10 +0000
- fix most remaining clippy findings (mostly redundant imports) (rust-lang/cargo#7912)
- Add -Zfeatures tracking issues. (rust-lang/cargo#7917)
- Use rust-lang/rust linkchecker on CI. (rust-lang/cargo#7913)
- Clean up code mostly based on clippy suggestions (rust-lang/cargo#7911)
- Add an option to include crate versions to the generated docs (rust-lang/cargo#7903)
- Better support for license-file. (rust-lang/cargo#7905)
- Add new feature resolver. (rust-lang/cargo#7820)
- Switch azure to macOS 10.15. (rust-lang/cargo#7906)
- Modified the help information of cargo-rustc (rust-lang/cargo#7892)
- Update for nightly rustfmt. (rust-lang/cargo#7904)
- Support `--config path_to_config.toml` cli syntax. (rust-lang/cargo#7901)
@ehuss ehuss added this to the 1.43.0 milestone Feb 6, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants