Open Proximyst opened 4 years ago
It'd be a great addition if we could generate values and have them cloned:
// This is day 2, 2019 #[aoc_generator(day2)] pub fn gen(input: &str) -> Vec<isize> { input .split(",") .map(|s| s.trim()) .flat_map(|s| s.parse::<isize>()) .collect() } #[aoc(day2, part1)] #[clone] pub fn day2_impl1(input: Vec<isize>) -> isize { unimplemented!() }
This should be timed in the benchmark as well, shouldn't it? If so, I'm not sure this is an improvement over just using let input = input.clone() on the first line.
let input = input.clone()
It'd be a great addition if we could generate values and have them cloned: