From f54286f7b76ac8f5daf5d4d13670347ce79fbe08 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 11 Nov 2022 08:22:14 +0100 Subject: [PATCH] upgrade clap --- Cargo.lock | 20 ++++++-------------- Cargo.toml | 2 +- src/args.rs | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8f7552..25f1963 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,26 +325,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.23" +version = "4.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "91b9970d7505127a162fdaa9b96428d28a479ba78c9ec7550a63a5d9863db682" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", - "indexmap", "once_cell", "strsim", "termcolor", - "textwrap", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck", "proc-macro-error", @@ -355,9 +353,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ "os_str_bytes", ] @@ -2647,12 +2645,6 @@ dependencies = [ "redox_termios", ] -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.37" diff --git a/Cargo.toml b/Cargo.toml index a7a60dc..db4638b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ migration = ["criner/migration"] doctest = false [dependencies] -clap = { version = "3.0.0-rc.4", features = ["derive"] } +clap = { version = "4.0.22", features = ["derive"] } humantime = "2.1.0" time = { version = "0.3.5", features = ["parsing", "macros" ] } criner = { version = "0.3.0", path = "./criner" } diff --git a/src/args.rs b/src/args.rs index c4a1435..5ffe5da 100644 --- a/src/args.rs +++ b/src/args.rs @@ -103,7 +103,7 @@ pub enum SubCommands { /// This job runs every 24h, as the database is updated that often. /// If unset, the job starts right away. /// Format is HH:MM, e.g. '14:30' for 2:30 pm or 03:15 for quarter past 3 in the morning. - #[clap(long, short = 'd', parse(try_from_str = parse_local_time))] + #[clap(long, short = 'd', value_parser = parse_local_time)] download_crates_io_database_every_24_hours_starting_at: Option, /// If set, the reporting stage will only iterate over crates that match the given standard unix glob.