Skip to content

Commit 8860b0c

Browse files
committed
changing match in favor of an if
1 parent 7a86247 commit 8860b0c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

crates/blockchain/blockchain.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,12 @@ impl Blockchain {
849849
let result = self.store_block(block, account_updates_list, res);
850850
let stored = Instant::now();
851851

852-
let instants = std::array::from_fn(move |i| match i {
853-
_ if i < instants.len() => instants[i],
854-
_ if i == instants.len() => stored,
855-
_ => unreachable!(),
852+
let instants = std::array::from_fn(move |i| {
853+
if i < instants.len() {
854+
instants[i]
855+
} else {
856+
stored
857+
}
856858
});
857859
if self.options.perf_logs_enabled {
858860
Self::print_add_block_pipeline_logs(

0 commit comments

Comments
 (0)