Some template changes to match common patterns.

This commit is contained in:
Bill Thiede 2021-12-13 21:51:46 -08:00
parent e93f6d01ca
commit 9cdb935254

View File

@ -9,21 +9,15 @@ use anyhow::Result;
use aoc_runner_derive::{aoc, aoc_generator}; use aoc_runner_derive::{aoc, aoc_generator};
use thiserror::Error; use thiserror::Error;
#[aoc_generator(dayX)]
fn parse(input: &str) -> Result<Vec<u64>> {
todo!("parse");
Ok(Vec::new())
}
#[aoc(dayX, part1)] #[aoc(dayX, part1)]
fn part1(input: &[u64]) -> Result<u64> { fn part1(input: &str) -> Result<usize> {
todo!("part1"); todo!("part1");
Ok(0) Ok(0)
} }
/* /*
#[aoc(dayX, part2)] #[aoc(dayX, part2)]
fn part2(input: &[u64]) -> Result<u64> { fn part2(input: &str) -> Result<usize> {
todo!("part2"); todo!("part2");
Ok(0) Ok(0)
} }
@ -38,7 +32,7 @@ mod tests {
let input = r#" let input = r#"
"# "#
.trim(); .trim();
assert_eq!(part1(&parse(input)?)?, u64::MAX); assert_eq!(part1(input)?, usize::MAX);
Ok(()) Ok(())
} }
@ -48,7 +42,7 @@ mod tests {
let input = r#" let input = r#"
"# "#
.trim(); .trim();
assert_eq!(part2(&parse(input)?)?, u64::MAX); assert_eq!(part2(input)?, usize::MAX);
Ok(()) Ok(())
} }
*/ */