File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,16 @@ use std::{
66
77use crate :: Day ;
88
9- const MODULE_TEMPLATE : & str = r#"pub fn part_one(input: &str) -> Option<u32> {
9+ const MODULE_TEMPLATE : & str = r#"advent_of_code::solution!(DAY_NUMBER);
10+
11+ pub fn part_one(input: &str) -> Option<u32> {
1012 None
1113}
1214
1315pub fn part_two(input: &str) -> Option<u32> {
1416 None
1517}
1618
17- advent_of_code::main!(DAY_NUMBER);
18-
1919#[cfg(test)]
2020mod tests {
2121 use super::*;
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ pub fn read_file(folder: &str, day: Day) -> String {
1919 f. expect ( "could not open input file" )
2020}
2121
22- /// main! produces a block setting up the input and runner for each part.
22+ /// Creates the constant `DAY` and sets up the input and runner for each part.
2323#[ macro_export]
24- macro_rules! main {
24+ macro_rules! solution {
2525 ( $day: expr) => {
2626 /// The current day.
2727 const DAY : advent_of_code:: Day = advent_of_code:: day!( $day) ;
You can’t perform that action at this time.
0 commit comments