Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

clippy: accounts-db lints #34628

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

brooksprumo
Copy link
Contributor

Problem

There are new nightly clippy lints in the accounts-db crate. Refer to #34626 for more information.

warning: this `let...else` may be rewritten with the `?` operator
  --> accounts-db/src/rolling_bit_field/iterators.rs:36:13
   |
36 | /             let Some(bit) = self.bit_range.next() else {
37 | |                 return None;
38 | |             };
   | |______________^ help: replace it with: `let bit = self.bit_range.next()?;`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
   = note: `#[warn(clippy::question_mark)]` on by default

    Checking solana-rpc-client-api v1.18.0 (/Users/brooks/src/solana/rpc-client-api)
warning: `solana-accounts-db` (lib) generated 1 warning

Summary of Changes

Fix 'em.

```
warning: this `let...else` may be rewritten with the `?` operator
  --> accounts-db/src/rolling_bit_field/iterators.rs:36:13
   |
36 | /             let Some(bit) = self.bit_range.next() else {
37 | |                 return None;
38 | |             };
   | |______________^ help: replace it with: `let bit = self.bit_range.next()?;`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
   = note: `#[warn(clippy::question_mark)]` on by default

    Checking solana-rpc-client-api v1.18.0 (/Users/brooks/src/solana/rpc-client-api)
warning: `solana-accounts-db` (lib) generated 1 warning
```
@brooksprumo brooksprumo self-assigned this Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09a94b8) 81.8% compared to head (f6a6d32) 81.8%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34628   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         824      824           
  Lines      222260   222259    -1     
=======================================
+ Hits       181893   181896    +3     
+ Misses      40367    40363    -4     

@brooksprumo brooksprumo marked this pull request as ready for review January 3, 2024 02:39
@brooksprumo brooksprumo requested a review from HaoranYi January 3, 2024 02:39
@brooksprumo brooksprumo added the automerge Merge this Pull Request automatically once CI passes label Jan 3, 2024
Copy link
Contributor

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify mergify bot merged commit e4ec68d into solana-labs:master Jan 3, 2024
36 checks passed
@brooksprumo brooksprumo deleted the clippy/accounts-db branch March 22, 2024 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants