Skip to content

Commit

Permalink
fix day 15 to use array
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-the-Bomb committed Dec 16, 2023
1 parent e1977d1 commit 9499f4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bin/day15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ impl Day15 {
/// If neither a '=' or '-' exist in an entry in the input
pub fn part_two<T: Display>(&self, inp: T) -> u32 {
let inp = inp.to_string();
let mut boxes = vec![Vec::new(); 256];
let mut boxes: [Vec<(&str, u32)>; 256] =
std::array::from_fn(|_| Vec::new());

for string in inp
.split(',')
Expand Down

0 comments on commit 9499f4c

Please sign in to comment.