1
0
Fork 0

day(20): fix clippy warnings

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-06 18:19:39 +02:00
parent 9aeb3e0977
commit b6381d38d7
Signed by: mfocko
SSH key fingerprint: SHA256:5YXD7WbPuK60gxnG6DjAwJiS9+swoWj33/HFu8g8JVo

View file

@ -110,7 +110,7 @@ impl Day20 {
watch: Option<u64>, watch: Option<u64>,
) -> (usize, usize, Option<usize>) { ) -> (usize, usize, Option<usize>) {
let mut q = VecDeque::new(); let mut q = VecDeque::new();
let mut counters = vec![0, 0]; let mut counters = [0, 0];
let mut high_idx = None; let mut high_idx = None;
q.push_back(("button".to_owned(), "broadcaster".to_owned(), false)); q.push_back(("button".to_owned(), "broadcaster".to_owned(), false));
@ -197,7 +197,7 @@ impl Solution<Output1, Output2> for Day20 {
fn part_2(&mut self) -> Output2 { fn part_2(&mut self) -> Output2 {
let rx_parent = &self.gates["rx"].inputs[0]; 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 cycles = vec![0_usize; self.gates[rx_parent].inputs.len()];
let mut found = 0; let mut found = 0;