diff options
author | Joris | 2022-12-18 15:03:51 +0100 |
---|---|---|
committer | Joris | 2022-12-18 15:03:51 +0100 |
commit | a6fd0110b65ec352603d69b9c4ccf3532689cd32 (patch) | |
tree | f6f8694a40ce620705525f1aca67edeba3074c0b /src/main.rs | |
parent | 241089e3a1427c2968b296cc6c4112e45b78c278 (diff) |
Upgrade dependencies
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)?); |