Skip to content

Commit

Permalink
Chore: Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshleaves committed Mar 16, 2024
1 parent 91eb54d commit 0bdd00b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand All @@ -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<PathBuf>,
}

mod common;

fn main() {
let args = Args::parse();
let input: String = match common::fetch_input(args.input) {
Expand Down
3 changes: 1 addition & 2 deletions src/year_2015.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![doc = include_str!("../NOTES_2015.md")]

//! Year 2015
//!
//! ```text
Expand Down Expand Up @@ -35,6 +33,7 @@
//! _ _ __ ___|___|___ __ _ _
//! ```
//!
#![doc = include_str!("../NOTES_2015.md")]
pub mod day_01;
pub mod day_02;
pub mod day_03;
Expand Down
3 changes: 1 addition & 2 deletions src/year_2016.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 0bdd00b

Please sign in to comment.