Add macro arm for only running single part of days solution
This commit is contained in:
parent
47e4f227bd
commit
fb4ac26f32
1 changed files with 18 additions and 0 deletions
|
@ -45,4 +45,22 @@ macro_rules! solution {
|
|||
run_part(part_two, &input, DAY, 2);
|
||||
}
|
||||
};
|
||||
($day:expr, 1) => { /// Allows solving part one in isolation
|
||||
const DAY: advent_of_code::Day = advent_of_code::day!($day);
|
||||
|
||||
fn main() {
|
||||
use advent_of_code::template::runner::*;
|
||||
let input = advent_of_code::template::read_file("inputs", DAY);
|
||||
run_part(part_one, &input, DAY, 1);
|
||||
}
|
||||
};
|
||||
($day:expr, 2) => { /// Allows solving part two in isolation
|
||||
const DAY: advent_of_code::Day = advent_of_code::day!($day);
|
||||
|
||||
fn main() {
|
||||
use advent_of_code::template::runner::*;
|
||||
let input = advent_of_code::template::read_file("inputs", DAY);
|
||||
run_part(part_two, &input, DAY, 2);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue