Skip to content

Commit

Permalink
Cargo clippy refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tjheslin1 committed Jan 3, 2022
1 parent a586413 commit c51e319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2021/day6/src/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ pub fn simulate_spawn(input: &str, days_to_simulate: usize) -> u64 {
(*spawned_fish).insert(DAYS_TO_CREATE_FISH, new_fish + *curr_count);
}

if let Some(_) = (*spawned_fish).get(&NEW_FISH_AGE) {
(*spawned_fish).insert(NEW_FISH_AGE, new_fish /* + *curr_count*/);
if (*spawned_fish).get(&NEW_FISH_AGE).is_some() {
(*spawned_fish).insert(NEW_FISH_AGE, new_fish);
}
});

Expand Down

0 comments on commit c51e319

Please sign in to comment.