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

clippy: Fixes blocks in conditions #34600

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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