mirror of
https://github.com/LeMoonStar/AoC24.git
synced 2025-07-08 00:10:00 +02:00
🚨 Day 6: Fixed warnings
This commit is contained in:
parent
2241f69905
commit
6f7872ed33
1 changed files with 2 additions and 13 deletions
|
@ -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,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue