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::{
6
6
7
7
use crate :: Day ;
8
8
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> {
10
12
None
11
13
}
12
14
13
15
pub fn part_two(input: &str) -> Option<u32> {
14
16
None
15
17
}
16
18
17
- advent_of_code::main!(DAY_NUMBER);
18
-
19
19
#[cfg(test)]
20
20
mod tests {
21
21
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 {
19
19
f. expect ( "could not open input file" )
20
20
}
21
21
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.
23
23
#[ macro_export]
24
- macro_rules! main {
24
+ macro_rules! solution {
25
25
( $day: expr) => {
26
26
/// The current day.
27
27
const DAY : advent_of_code:: Day = advent_of_code:: day!( $day) ;
You can’t perform that action at this time.
0 commit comments