From 0bdd00b96e8de884c6052cab0d41c28f27d3aa2a Mon Sep 17 00:00:00 2001 From: red Date: Sat, 16 Mar 2024 22:15:30 +0100 Subject: [PATCH] Chore: Small fixes --- src/main.rs | 8 ++++---- src/year_2015.rs | 3 +-- src/year_2016.rs | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2f3aec8..a4049e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,11 +2,9 @@ use advent_rs; use clap::Parser; use std::path::PathBuf; -mod common; - /// Solver for advent of code exercises #[derive(Parser, Debug)] -#[command(about, long_about = None)] +#[command(version, about, long_about = None)] struct Args { /// The year of the exercise, from 2015 #[arg(short, long, value_parser = clap::value_parser!(u16))] @@ -21,10 +19,12 @@ struct Args { part: u8, // File name - #[arg(value_parser = clap::value_parser!(PathBuf))] + #[arg(help = "Input file path (will read from STDIN if empty)", value_parser = clap::value_parser!(PathBuf))] input: Option, } +mod common; + fn main() { let args = Args::parse(); let input: String = match common::fetch_input(args.input) { diff --git a/src/year_2015.rs b/src/year_2015.rs index 5d7d69e..09c76fb 100644 --- a/src/year_2015.rs +++ b/src/year_2015.rs @@ -1,5 +1,3 @@ -#![doc = include_str!("../NOTES_2015.md")] - //! Year 2015 //! //! ```text @@ -35,6 +33,7 @@ //! _ _ __ ___|___|___ __ _ _ //! ``` //! +#![doc = include_str!("../NOTES_2015.md")] pub mod day_01; pub mod day_02; pub mod day_03; diff --git a/src/year_2016.rs b/src/year_2016.rs index 068cd06..37f1f93 100644 --- a/src/year_2016.rs +++ b/src/year_2016.rs @@ -1,7 +1,6 @@ -#![doc = include_str!("../NOTES_2016.md")] - //! Year 2016 //! +#![doc = include_str!("../NOTES_2016.md")] pub mod day_01; pub mod day_02; pub mod day_03;