From e3a5aaa35bc1ef3be9c514ee537729ba4ebe3103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Bj=C3=B6rkqvist?= Date: Thu, 26 Sep 2024 11:24:27 +0200 Subject: [PATCH] Clippy --- .../icrc1/tests/golden_state_upgrade_downgrade.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rs/rosetta-api/icrc1/tests/golden_state_upgrade_downgrade.rs b/rs/rosetta-api/icrc1/tests/golden_state_upgrade_downgrade.rs index 58a7c0c41b1..a2c34fefb96 100644 --- a/rs/rosetta-api/icrc1/tests/golden_state_upgrade_downgrade.rs +++ b/rs/rosetta-api/icrc1/tests/golden_state_upgrade_downgrade.rs @@ -145,10 +145,9 @@ impl LedgerState { burns_without_spender: Option>, previous_ledger_state: Option, ) -> Self { - let num_blocks_to_fetch = match &previous_ledger_state { - None => None, - Some(previous_ledger_state) => Some(previous_ledger_state.num_blocks), - }; + let num_blocks_to_fetch = previous_ledger_state + .as_ref() + .map(|previous_ledger_state| previous_ledger_state.num_blocks); let mut ledger_state = LedgerState::new(burns_without_spender); // Only fetch the blocks that were present when the previous state was generated. This is