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 errors/warnings when upgrading to Rust 1.51 #839

Merged
merged 7 commits into from
Mar 25, 2021

Conversation

thanethomson
Copy link
Contributor

Rust's 1.51 release brought with it a number of new clippy errors and warnings. This PR attempts to address the bulk of them.

Unfortunately this results in some breaking changes to data structures' names, because they were improperly named up to now according to Rust's API guidelines.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG.md

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@codecov-io
Copy link

Codecov Report

Merging #839 (94fbd01) into master (8f29824) will decrease coverage by 26.3%.
The diff coverage is 18.6%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #839      +/-   ##
=========================================
- Coverage    55.7%   29.3%   -26.4%     
=========================================
  Files         198     194       -4     
  Lines       14063   10766    -3297     
  Branches     3692    4444     +752     
=========================================
- Hits         7834    3156    -4678     
+ Misses       5897    4652    -1245     
- Partials      332    2958    +2626     
Impacted Files Coverage Δ
abci/src/error.rs 0.0% <0.0%> (ø)
light-client-js/src/utils.rs 0.0% <0.0%> (ø)
light-client/src/components/verifier.rs 62.8% <0.0%> (-28.4%) ⬇️
light-client/src/lib.rs 100.0% <ø> (ø)
light-client/src/operations/commit_validator.rs 93.9% <0.0%> (-6.1%) ⬇️
light-client/src/operations/voting_power.rs 48.0% <0.0%> (-40.6%) ⬇️
light-client/src/predicates/errors.rs 28.5% <0.0%> (-26.2%) ⬇️
light-client/src/store/sled.rs 36.9% <ø> (-32.2%) ⬇️
light-client/src/supervisor.rs 31.5% <0.0%> (-48.7%) ⬇️
light-node/src/commands/start.rs 0.0% <0.0%> (ø)
... and 210 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 630ca02...94fbd01. Read the comment docs.

@thanethomson thanethomson marked this pull request as ready for review March 25, 2021 17:18
@thanethomson thanethomson merged commit 4b0318c into master Mar 25, 2021
@thanethomson thanethomson deleted the thane/rust-1.51 branch March 25, 2021 17:28
@vitorenesduarte vitorenesduarte mentioned this pull request Mar 26, 2021
5 tasks
thanethomson added a commit that referenced this pull request Mar 30, 2021
* Rename domain types to comply with Rust API standards

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix incorrect enum name

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix clippy errors

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix more clippy lints

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add preliminary CHANGELOG

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix clippy warnings for tendermint-p2p crate

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add CHANGELOG links

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants