From 83e9841fe496c784161b7c95fbaf37dd2eeb5e05 Mon Sep 17 00:00:00 2001 From: steviez Date: Mon, 29 Jul 2024 14:12:29 -0500 Subject: [PATCH] Use combinator to simplify check for slot < halt_at_slot --- ledger/src/blockstore_processor.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index 70cdf37b567ff5..d7af22926c8885 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -1733,10 +1733,7 @@ fn process_next_slots( // This is a fork point if there are multiple children, create a new child bank for each fork for next_slot in &meta.next_slots { - let skip_next_slot = halt_at_slot - .map(|halt_at_slot| *next_slot > halt_at_slot) - .unwrap_or(false); - if skip_next_slot { + if halt_at_slot.is_some_and(|halt_at_slot| *next_slot > halt_at_slot) { continue; }