Added solution for AoC 2022/3, in python and in rust

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2022-12-03 13:59:13 +01:00
parent a5420b8c51
commit 04f18534bc
17 changed files with 816 additions and 6 deletions

View File

@@ -61,6 +61,7 @@ dependencies = [
name = "common"
version = "0.1.0"
dependencies = [
"clap",
"tracing",
]

View File

@@ -17,7 +17,7 @@ name = "calorie_counting"
path = "src/bin.rs"
[dependencies]
clap = {version = "4.0.22", features = ["derive"]}
tracing = "0.1"
tracing-subscriber = {version = "0.3.16", features = ["env-filter"]}
common = {path = "../common/"}
common = {path = "../common/"}
clap = {version = "4.0.22", features = ["derive"]}

View File

@@ -1,10 +1,9 @@
use common::cli::Cli;
use calorie_counting_lib::{task_1a, task_1b};
use clap::Parser;
use tracing::{info, debug};
mod cli;
use crate::cli::Cli;
pub fn main() {
tracing_subscriber::fmt::init();
debug!("Running with DEBUG logging");

View File

@@ -1,10 +0,0 @@
use clap::Parser;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(author, version, about=None, long_about = None)]
pub struct Cli {
/// Path to the input file.
#[arg(short, long)]
pub input: PathBuf,
}