From 931039bb6aca9462778b074e94975bb41b7442b2 Mon Sep 17 00:00:00 2001 From: Connor Slade Date: Sat, 9 Dec 2023 00:26:40 -0500 Subject: [PATCH] [2023] Fix clippy lints --- aoc_2023/src/day_08.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aoc_2023/src/day_08.rs b/aoc_2023/src/day_08.rs index b5ba1da..8128486 100644 --- a/aoc_2023/src/day_08.rs +++ b/aoc_2023/src/day_08.rs @@ -35,8 +35,8 @@ impl Solution for Day08 { let map = parse(input); let mut pos = Vec::new(); - for (&id, _) in &map.nodes { - if id.ends_with("A") { + for &id in map.nodes.keys() { + if id.ends_with('A') { pos.push(id); } } @@ -50,7 +50,7 @@ impl Solution for Day08 { i += 1; cycle_len += 1; - if pos.ends_with("Z") { + if pos.ends_with('Z') { cycles.push(cycle_len); break; }