From 5f5faa574025ddd8a62bc42d56c926c29136b867 Mon Sep 17 00:00:00 2001 From: "Rick Mann (Riari)" <3583774+Riari@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:50:46 +0000 Subject: [PATCH] Clean up day 04 --- src/bin/04.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/04.rs b/src/bin/04.rs index 35a923a..b4066fd 100644 --- a/src/bin/04.rs +++ b/src/bin/04.rs @@ -39,9 +39,7 @@ fn solve(input: &str, award_cards: bool) -> Option { } win_index += 1; - let card = stacks.get_mut(&(stack_index + win_index)); - - card.unwrap().copies += 1; + stacks.get_mut(&(stack_index + win_index)).unwrap().copies += 1; total_cards += 1; } }