Skip to content

Commit b00858a

Browse files
committed
Clippy and comment
1 parent 34903c8 commit b00858a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

aoc2025/src/bin/10.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn solve_part2(buttons: &[Vec<usize>], joltages: &[u64]) -> u64 {
8080
.collect();
8181

8282
let sum = Int::add(&terms);
83-
opt.assert(&sum.eq(&Int::from_u64(jolt)));
83+
opt.assert(&sum.eq(Int::from_u64(jolt)));
8484
}
8585

8686
// Constraint: t >= 0 (can't press a button negative times)

aoc2025/src/bin/11.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use itertools::Itertools;
55
advent_of_code::solution!(11);
66

77
fn parse_input(input: &str) -> (HashMap<usize, Vec<usize>>, HashMap<String, usize>) {
8+
// convert all the ids to usize ints because borrow checker and &str don't get along
9+
// It's also almost certainly more efficient for hashing
810
let mut machine_ids = HashMap::new();
911
let s_to_id = move |m: String, machine_ids: &mut HashMap<String, usize>| {
1012
if let Some(x) = machine_ids.get(&m) {
@@ -61,6 +63,7 @@ pub fn part_one(input: &str) -> Option<u64> {
6163
Some(total)
6264
}
6365

66+
#[allow(clippy::too_many_arguments)]
6467
fn recurse_paths_part2(
6568
m: usize,
6669
end: usize,

0 commit comments

Comments
 (0)