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 nightly clippy errors #984

Merged
merged 2 commits into from
Sep 20, 2021
Merged

Fix nightly clippy errors #984

merged 2 commits into from
Sep 20, 2021

Conversation

thanethomson
Copy link
Member

In working towards #978, some new clippy errors are popping up in CI with the latest Rust nightly. See https://github.com/informalsystems/tendermint-rs/pull/978/checks?check_run_id=3635238166 for an example.

This PR attempts to address these errors. If acceptable, I'll merge to master and then pull these changes into #978.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson changed the title Fix clippy errors Fix nightly clippy errors Sep 17, 2021
@thanethomson
Copy link
Member Author

thanethomson commented Sep 17, 2021

This error seems to be addressed in #978.

Also, I just confirmed that this change applied to #978 fixes the current documentation build failure in #978. Without this change, we get:

> RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features

...

error: field is never read: `db`
  --> light-client/src/store/sled.rs:26:5
   |
26 |     db: sled::Db,
   |     ^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> light-client/src/lib.rs:3:5
   |
3  |     warnings,
   |     ^^^^^^^^
   = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: field is never read: `chain_id`
  --> light-client/src/tests.rs:87:5
   |
87 |     chain_id: String,
   |     ^^^^^^^^^^^^^^^^

error: could not compile `tendermint-light-client` due to 2 previous errors

Copy link
Contributor

@xla xla left a comment

Choose a reason for hiding this comment

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

🏝 👏 🏔 🐶

@thanethomson thanethomson merged commit dd37137 into master Sep 20, 2021
@thanethomson thanethomson deleted the thane/fix-clippy-errors branch September 20, 2021 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants