-
Notifications
You must be signed in to change notification settings - Fork 0
/
day_template.rs
42 lines (32 loc) · 911 Bytes
/
day_template.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use aoc::*;
type ResultType = usize;
type DataType = ();
fn parse(_input: &str) -> Result<DataType> {
Ok(())
}
fn task1(_data: &DataType) -> Result<ResultType> {
Err(AoCError::Unsolved)
}
fn task2(_data: &DataType) -> Result<ResultType> {
Err(AoCError::Unsolved)
}
fn main() -> Result<()> {
let mut solution = Solution::<ResultType, DataType>::new(&parse, &task1, &task2);
solution.solve_for_answer(YEAR, DAY)?;
println!("Advent of Code {YEAR} day {DAY}");
println!("-------------------------");
println!("{solution}");
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn examples() {
let input = r#""#;
let mut solution = Solution::<ResultType, DataType>::new(&parse, &task1, &task2);
let (task1, task2) = solution.solve_for_test(input).unwrap();
assert_eq!(task1, None);
assert_eq!(task2, None);
}
}