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

chore(clippy): Fix clippy cast and closure warnings #5378

Merged
merged 6 commits into from
Oct 14, 2022
Merged

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 11, 2022

Motivation

Clippy nightly has new warnings, they clean up our code a bit.

Review

This is a low priority, it doesn't matter if it gets in the release candidate or not.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added A-rust Area: Updates to Rust code C-cleanup Category: This is a cleanup P-Low ❄️ labels Oct 11, 2022
@teor2345 teor2345 self-assigned this Oct 11, 2022
@teor2345 teor2345 requested review from a team as code owners October 11, 2022 03:48
@teor2345 teor2345 requested review from upbqdn and removed request for a team October 11, 2022 03:48
@github-actions github-actions bot added C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Oct 11, 2022
@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #5378 (c6a7f69) into main (7207f9d) will decrease coverage by 0.03%.
The diff coverage is 78.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5378      +/-   ##
==========================================
- Coverage   79.19%   79.16%   -0.04%     
==========================================
  Files         308      308              
  Lines       39560    39757     +197     
==========================================
+ Hits        31329    31472     +143     
- Misses       8231     8285      +54     

Copy link
Member

@upbqdn upbqdn left a comment

Choose a reason for hiding this comment

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

clippy on stable has some suggestions regarding the .ok_or_else.

@teor2345 teor2345 marked this pull request as draft October 11, 2022 19:46
@teor2345
Copy link
Contributor Author

clippy on stable has some suggestions regarding the .ok_or_else.

I think stable clippy is wrong, I'll push some ignores when I get a chance.

@teor2345 teor2345 marked this pull request as ready for review October 12, 2022 00:06
@teor2345 teor2345 requested a review from upbqdn October 12, 2022 00:19
upbqdn
upbqdn previously approved these changes Oct 12, 2022
teor2345 and others added 2 commits October 13, 2022 06:41
Copy link
Member

@upbqdn upbqdn left a comment

Choose a reason for hiding this comment

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

We have more clippy::unnecessary-lazy-evaluations.

@upbqdn
Copy link
Member

upbqdn commented Oct 12, 2022

Now I noticed clippy's output uses the hyphen-minus in lint names, but one has to use underscores for lint names in the code. Insidious!

@teor2345 teor2345 requested a review from upbqdn October 12, 2022 22:49
@teor2345
Copy link
Contributor Author

We have more clippy::unnecessary-lazy-evaluations.

Should be fixed now, I put it on the correct line.

@teor2345
Copy link
Contributor Author

ERROR: (gcloud.compute.ssh) Could not fetch resource:

  • Authentication backend unavailable.

https://github.com/ZcashFoundation/zebra/actions/runs/3238406056/jobs/5307121094#step:6:105

Copy link
Member

@upbqdn upbqdn left a comment

Choose a reason for hiding this comment

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

🎉

mergify bot added a commit that referenced this pull request Oct 14, 2022
@mergify mergify bot merged commit 7daffb5 into main Oct 14, 2022
@mergify mergify bot deleted the clippy-2022-10-11 branch October 14, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug C-cleanup Category: This is a cleanup C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants