Init 2025

This commit is contained in:
2025-12-01 13:50:08 +02:00
parent 20d6c6bff0
commit dc25916f7b
13 changed files with 1142 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
use {{crate_name}}::part1::process;
use miette::{Context, Result};
#[tracing::instrument]
fn main() -> Result<()> {
tracing_subscriber::fmt::init();
let file = include_str!("../../input1.txt");
let result = process(file).context("process part 1")?;
println!("{result}");
Ok(())
}

View File

@@ -0,0 +1,12 @@
use {{crate_name}}::part2::process;
use miette::{Context, Result};
#[tracing::instrument]
fn main() -> Result<()> {
tracing_subscriber::fmt::init();
let file = include_str!("../../input2.txt");
let result = process(file).context("process part 2")?;
println!("{result}");
Ok(())
}

View File

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

View File

@@ -0,0 +1,21 @@
use miette::Result;
#[tracing::instrument]
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,21 @@
use miette::Result;
#[tracing::instrument]
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(())
}
}