inline const is funny
This commit is contained in:
parent
4e4cc58bec
commit
6240299f1b
2 changed files with 3 additions and 2 deletions
|
@ -18,8 +18,7 @@ impl Day for Day15 {
|
|||
}
|
||||
|
||||
fn part2(&mut self) -> String {
|
||||
const ARRAY_REPEAT_VALUE: Vec<(&str, u8)> = Vec::new();
|
||||
let mut boxes: [Vec<(&str, u8)>; 256] = [ARRAY_REPEAT_VALUE; 256];
|
||||
let mut boxes = [const { Vec::<(&str, u8)>::new() }; 256];
|
||||
|
||||
for operation in self.input.split(',') {
|
||||
let ((box_id, label), focal_length) = operation
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![feature(inline_const)]
|
||||
|
||||
use std::{collections::HashMap, num::NonZeroUsize};
|
||||
|
||||
use clru::CLruCache;
|
||||
|
|
Loading…
Reference in a new issue