Setup for 2023

This commit is contained in:
2023-12-01 11:12:56 +01:00
parent ea51fd11fe
commit 1b597ec05f
5 changed files with 143 additions and 0 deletions

50
2023/template.rs Normal file
View File

@@ -0,0 +1,50 @@
#![feature(test)]
use anyhow::Result;
use aoc::Solver;
// -- Runners --
fn main() -> Result<()> {
Day::solve()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn part1_test1() -> Result<()> {
Day::test(Day::part1, "test-1", TEST)
}
// Benchmarks
extern crate test;
#[bench]
#[ignore]
fn part1_bench(b: &mut test::Bencher) {
Day::benchmark(Day::part1, b)
}
#[bench]
#[ignore]
fn part2_bench(b: &mut test::Bencher) {
Day::benchmark(Day::part2, b)
}
}
// -- Solution --
pub struct Day;
impl aoc::Solver for Day {
type Output1 = TYPE;
type Output2 = TYPE;
fn day() -> u8 {
DAY
}
fn part1(input: &str) -> Self::Output1 {
DEFAULT
}
fn part2(input: &str) -> Self::Output2 {
DEFAULT
}
}