diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 56a499c..d3080ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,17 +5,17 @@ mod model; mod validation; use anyhow::Result; -use structopt::StructOpt; +use clap::Parser; -#[derive(StructOpt)] -#[structopt()] +#[derive(Parser)] +#[clap()] struct Opt { /// Path of SQLite database in which to store events - #[structopt(long = "database", default_value = "database.sqlite3")] + #[clap(long = "database", default_value = "database.sqlite3")] db_path: String, /// List today’s events as plain text - #[structopt(long = "list-today")] + #[clap(long = "list-today")] list_today: bool, } @@ -23,7 +23,7 @@ fn main() -> Result<()> { let Opt { db_path, list_today, - } = Opt::from_args(); + } = Opt::parse(); let conn = db::init(&db_path)?; if list_today { print!("{}", cli::today(&conn)?); |