From dbee7d91b607b0959dc283f494abc9fa6e7a1161 Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Wed, 18 Dec 2024 15:41:57 -0800 Subject: [PATCH] day18: clippies --- src/day18.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/day18.rs b/src/day18.rs index 3063fa9..8270d7e 100644 --- a/src/day18.rs +++ b/src/day18.rs @@ -1,7 +1,10 @@ use aoc_runner_derive::aoc; use grid::Grid; use itertools::Itertools; -use std::{cmp::Reverse, collections::{BinaryHeap, VecDeque}}; +use std::{ + cmp::Reverse, + collections::{BinaryHeap, VecDeque}, +}; #[derive(Clone)] struct MemoryMap { @@ -127,6 +130,7 @@ impl MemoryMap { None } + #[allow(dead_code)] // will be moved to Grid at some point fn dijkstra(&self, start: (i64, i64)) -> Option { let goal = (self.map.width() as i64 - 1, self.map.height() as i64 - 1); @@ -222,7 +226,7 @@ pub fn part2_impl(input: &str, width: usize, height: usize, initial_safe_byte_co local_map.bfs::((0, 0)).is_some() }) + initial_safe_byte_count; - return input_map.byte_stream[solution]; + input_map.byte_stream[solution] } #[aoc(day18, part1)]