Macro aoc_driver::run[][src]

run!() { /* proc-macro */ }
Expand description

Runs a given function

Usage:

run!(year, day, part, function, input_path);

eg.

run!(2021, 1, 1, year2020::day1::part1, "input/2020/1.txt")

The function may also be a string literal ie "year2020::day1::part1"

The function should be able to take in a &str and output something which is displayable eg.

fn example(input: &str) -> impl std::fmt::Display {
    ...
}

input_path must be a path to a file containing the input into the function