Skip to content

Commit

Permalink
clippy: Fixes blocks in conditions (solana-labs#34600)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Dec 28, 2023
1 parent f8c3e24 commit 58170cf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7973,10 +7973,12 @@ impl Bank {
}
}
for precompile in get_precompiles() {
#[allow(clippy::blocks_in_if_conditions)]
if precompile.feature.map_or(false, |ref feature_id| {
self.feature_set.is_active(feature_id)
}) {
let should_add_precompile = precompile
.feature
.as_ref()
.map(|feature_id| self.feature_set.is_active(feature_id))
.unwrap_or(false);
if should_add_precompile {
self.add_precompile(&precompile.program_id);
}
}
Expand Down

0 comments on commit 58170cf

Please sign in to comment.