chore: clippy + time

This commit is contained in:
Xavier Morel
2024-12-10 14:08:36 +01:00
parent 6baedf6fde
commit 4df513a1a7
2 changed files with 2 additions and 24 deletions

View File

@@ -1,7 +1,5 @@
advent_of_code::solution!(10);
use std::iter::successors;
#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq)]
struct Pos {
x: usize,
@@ -94,27 +92,6 @@ impl Topo {
}
}
fn print_route(route: Vec<(Pos, u8)>, max: &Pos) {
println!("==========");
for y in 0..max.y {
print!("|");
for x in 0..max.x {
let mut found = false;
for r in &route {
if r.0.x == x && r.0.y == y {
found = true;
print!("{}", r.1);
}
}
if !found {
print!(" ");
}
}
println!("|");
}
println!("==========");
}
pub fn part_one(input: &str) -> Option<usize> {
let topo = Topo::init(input).ok()?;
let ths = topo.get_trailheads();