This commit is contained in:
2024-12-01 16:31:58 +02:00
parent e8d9e24272
commit 93a3c0a932
11 changed files with 322 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
[package]
name = "{{project-name}}"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
color-eyre.workspace = true

View File

View File

@@ -0,0 +1,9 @@
use color_eyre::Result;
use {{crate_name}}::part1::process;
fn main() -> Result<()> {
let file = include_str!("../../input1.txt");
let result = process(file)?;
println!("{}", result);
Ok(())
}

View File

@@ -0,0 +1,9 @@
use color_eyre::Result;
use {{crate_name}}::part2::process;
fn main() -> Result<()> {
let file = include_str!("../../input2.txt");
let result = process(file)?;
println!("{}", result);
Ok(())
}

View File

@@ -0,0 +1,2 @@
pub mod part1;
pub mod part2;

View File

@@ -0,0 +1,20 @@
use color_eyre::Result;
pub fn process(input: &str) -> Result<usize> {
todo!("day xx - part 1");
Ok(0)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_process() -> Result<()> {
let input = "";
todo!("haven't built test yet");
let result = 0;
assert_eq!(process(input)?, result);
Ok(())
}
}

View File

@@ -0,0 +1,20 @@
use color_eyre::Result;
pub fn process(input: &str) -> Result<usize> {
todo!("day xx - part 2");
Ok(0)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_process() -> Result<()> {
let input = "";
todo!("haven't built test yet");
let result = 0;
assert_eq!(process(input)?, result);
Ok(())
}
}