From b6381d38d7102c5f62094b77fbe7a38e44d68c73 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 6 Jul 2024 18:19:39 +0200 Subject: [PATCH] day(20): fix clippy warnings Signed-off-by: Matej Focko --- src/bin/day20.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/day20.rs b/src/bin/day20.rs index 906f2ee..dc97d89 100644 --- a/src/bin/day20.rs +++ b/src/bin/day20.rs @@ -110,7 +110,7 @@ impl Day20 { watch: Option, ) -> (usize, usize, Option) { let mut q = VecDeque::new(); - let mut counters = vec![0, 0]; + let mut counters = [0, 0]; let mut high_idx = None; q.push_back(("button".to_owned(), "broadcaster".to_owned(), false)); @@ -197,7 +197,7 @@ impl Solution for Day20 { fn part_2(&mut self) -> Output2 { let rx_parent = &self.gates["rx"].inputs[0]; - let rx_parent_hash = Some(gate_hash(&rx_parent)); + let rx_parent_hash = Some(gate_hash(rx_parent)); let mut cycles = vec![0_usize; self.gates[rx_parent].inputs.len()]; let mut found = 0;