1
0
Fork 0

Update deps

cached macro is now easier to read.
This commit is contained in:
Lars Martens 2025-12-07 15:36:13 +01:00
parent 2759b7e1f6
commit 7188518ae1
Signed by: haselkern
GPG key ID: B5CF1F363C179AD4
3 changed files with 123 additions and 147 deletions

View file

@ -1,5 +1,5 @@
use aoc::*;
use cached::{proc_macro::cached, stores::UnboundCache};
use cached::proc_macro::cached;
use std::collections::HashSet;
const INPUT: &str = include_str!("../../input/07");
@ -53,8 +53,7 @@ fn split_count(splitters: &HashSet<i32>, beams: HashSet<i32>) -> (usize, HashSet
}
#[cached(
type = "UnboundCache<(i32, usize), usize>",
create = "{ UnboundCache::new() }",
key = "(i32, usize)",
convert = r#"{ (beam, depth) }"#
)]
fn timelines(beam: i32, depth: usize, splitters: &[HashSet<i32>]) -> usize {