Skip to content

Commit

Permalink
[2024] Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Dec 16, 2024
1 parent f9ebfa3 commit 9f36913
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion aoc_2024/src/day_11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn solve(nums: Vec<u64>, iters: usize) -> u64 {
counts = next;
}

counts.values().sum::<u64>().into()
counts.values().sum::<u64>()
}

fn parse(input: &str) -> Vec<u64> {
Expand Down
2 changes: 1 addition & 1 deletion aoc_2024/src/day_13.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Problem {
}

fn solve(&self) -> u64 {
self.cases.iter().map(|x| x.cheapest()).sum::<u64>().into()
self.cases.iter().map(|x| x.cheapest()).sum::<u64>()
}

fn part_b(mut self) -> Self {
Expand Down
10 changes: 4 additions & 6 deletions aoc_2024/src/day_15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ impl Problem {
self.idx += 1;

let new = dir.advance(self.pos);
if {
if part_b {
self.push_b(new, dir)
} else {
self.push(new, dir)
}
if if part_b {
self.push_b(new, dir)
} else {
self.push(new, dir)
} {
self.pos = new;
}
Expand Down

0 comments on commit 9f36913

Please sign in to comment.