🚨 Day 6: Fixed warnings

This commit is contained in:
LeMoonStar 2024-12-06 21:25:48 +01:00
parent 2241f69905
commit 6f7872ed33

View file

@ -1,9 +1,5 @@
use super::{Answer, Day, DayImpl}; use super::{Answer, Day, DayImpl};
use std::{ use std::{collections::HashSet, hash::Hash};
collections::{HashMap, HashSet},
hash::Hash,
path::Iter,
};
const CURRENT_DAY: u8 = 6; const CURRENT_DAY: u8 = 6;
@ -133,12 +129,6 @@ pub struct PatrollingMap {
} }
impl PatrollingMap { impl PatrollingMap {
pub fn get_visiting_positions(&self) -> HashSet<Position> {
let mut visited = HashSet::new();
visited
}
pub fn is_obstacle(&self, pos: Position) -> bool { pub fn is_obstacle(&self, pos: Position) -> bool {
self.obstacles.contains(&pos) self.obstacles.contains(&pos)
} }
@ -239,7 +229,6 @@ impl DayImpl<Data> for Day<CURRENT_DAY> {
.map(|v| v.0) .map(|v| v.0)
.collect(); .collect();
// NOTE: More than 1812 // NOTE: More than 1812
Answer::Number( Answer::Number(
main_path_visited main_path_visited
@ -249,7 +238,7 @@ impl DayImpl<Data> for Day<CURRENT_DAY> {
map.add_obstruction(**pos); map.add_obstruction(**pos);
map.iter().is_loop() map.iter().is_loop()
}) })
.count() as u64 .count() as u64,
) )
} }
} }