decided to clippy 2023 in 2024

This commit is contained in:
Dylan Thies
2024-12-02 11:49:26 -05:00
parent 0e93372b96
commit cd22838062
7 changed files with 18 additions and 19 deletions

View File

@@ -57,11 +57,12 @@ pub fn part2(input: &str) -> String {
let pos_in_cycle = start_of_cycle + (cycles - end_of_cycle) % len_of_cyle;
map = cache
.values()
.find_map(|(look_at_map, pos)| (*pos == pos_in_cycle).then_some(look_at_map))
.unwrap()
.clone();
map.clone_from(
cache
.values()
.find_map(|(look_at_map, pos)| (*pos == pos_in_cycle).then_some(look_at_map))
.unwrap(),
);
let mut total = 0_usize;
for col in 0..maxes.x {