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

Fix clippy::use-self warning in src/main.rs` #8216

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

pmnoxx
Copy link
Contributor

@pmnoxx pmnoxx commented Jan 3, 2022

ClippyCmd warnings gets generated due to addition of clippy::use-self. This PR fixes that.

warning: unnecessary structure name repetition
  --> src/main.rs:99:9
   |
99 |         ClippyCmd {
   |         ^^^^^^^^^ help: use the applicable keyword: `Self`
   |
   = note: `-W clippy::use-self` implied by `-W clippy::nursery`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self

changelog: none

@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 @xFrednet (or someone else) soon.

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 Jan 3, 2022
Copy link
Member

@xFrednet xFrednet left a comment

Choose a reason for hiding this comment

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

Thank you for the Pull Request, the change looks good to me. Before merging this, I'm interested how you found this. Our Dogfood test should have caught this in the CI, have you executed some other command? 🙃

@pmnoxx
Copy link
Contributor Author

pmnoxx commented Jan 3, 2022

Thank you for the Pull Request, the change looks good to me. Before merging this, I'm interested how you found this. Our Dogfood test should have caught this in the CI, have you executed some other command? upside_down_face

I executed this command cargo clippy -- -W clippy::all -W clippy::pedantic -W clippy::nursery

@xFrednet
Copy link
Member

xFrednet commented Jan 3, 2022

That's a good hint, looking at the dogfood test it seems like it also ignores the sources under test. That's good to know! Thank you 🙃

@bors r+

@bors
Copy link
Contributor

bors commented Jan 3, 2022

📌 Commit 19cfcd5 has been approved by xFrednet

@bors
Copy link
Contributor

bors commented Jan 3, 2022

⌛ Testing commit 19cfcd5 with merge df9a418...

bors added a commit that referenced this pull request Jan 3, 2022
Fix `clippy::use-self`` warning in ` src/main.rs`

`ClippyCmd` warnings gets generated due to addition of `clippy::use-self`. This PR fixes that.

```
warning: unnecessary structure name repetition
  --> src/main.rs:99:9
   |
99 |         ClippyCmd {
   |         ^^^^^^^^^ help: use the applicable keyword: `Self`
   |
   = note: `-W clippy::use-self` implied by `-W clippy::nursery`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
```
@bors
Copy link
Contributor

bors commented Jan 3, 2022

💔 Test failed - checks-action_test

@xFrednet
Copy link
Member

xFrednet commented Jan 3, 2022

BTW, I just noticed that your GH profile isn't linked to the commit. The email is probably different, this is not a problem, and it can be merged as it is, just wanted to point that out in case that was an accident. I'll wait for a response until I retry 🙃

(I fixed the changelog entry)

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Jan 3, 2022

I think -W clippy::nursery is not part of the clippy-self-check of the ci setup.
edit: (as to why this went unnoticed)

@pmnoxx
Copy link
Contributor Author

pmnoxx commented Jan 3, 2022

BTW, I just noticed that your GH profile isn't linked to the commit. The email is probably different, this is not a problem, and it can be merged as it is, just wanted to point that out in case that was an accident. I'll wait for a response until I retry upside_down_face

(I fixed the changelog entry)

Thanks for noticing. How did you find out that it's not linked properly?

@pmnoxx
Copy link
Contributor Author

pmnoxx commented Jan 3, 2022

I changed setting in my github profile, the email address should be linked properly now.

@xFrednet
Copy link
Member

xFrednet commented Jan 3, 2022

You can look at the commit in this PR if your picture shows up, and you can click on it, then it's correctly linked. (Like it is now) 👍

@bors retry

@bors
Copy link
Contributor

bors commented Jan 3, 2022

⌛ Testing commit 19cfcd5 with merge 3ea7784...

@bors
Copy link
Contributor

bors commented Jan 3, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 3ea7784 to master...

@bors bors merged commit 3ea7784 into rust-lang:master Jan 3, 2022
@pmnoxx pmnoxx deleted the piotr-fix-clippy-warnings branch January 4, 2022 05:37
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