clippy: accounts-db lints (#34628)
``` 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 ```
This commit is contained in:
parent
de976be596
commit
e4ec68d704
|
@ -33,9 +33,7 @@ impl Iterator for RollingBitFieldOnesIter<'_> {
|
|||
// Then iterate over the bit vec
|
||||
loop {
|
||||
// If there are no more bits in the range, then we've iterated over everything and are done
|
||||
let Some(bit) = self.bit_range.next() else {
|
||||
return None;
|
||||
};
|
||||
let bit = self.bit_range.next()?;
|
||||
|
||||
if self.rolling_bit_field.contains_assume_in_range(&bit) {
|
||||
break Some(bit);
|
||||
|
|
Loading…
Reference in New Issue