chiark / gitweb /
clap: Use ArgAction::Count for debug level
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 18:41:41 +0000 (19:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 20:15:29 +0000 (21:15 +0100)
commit92cd28d2c0412a49aba653b9f0968d2bc4431285
tree4309e18538920752d8f79c714e37cddf108a7bf2
parentde531818d9f5ee9906ca7bc78742787d74ef53e5
clap: Use ArgAction::Count for debug level

Removes a deprecation warning (this is recommended by the clap 3 to 4
migration guide).

    Checking hippotat v1.1.7 (/volatile/rustcargo/Rustup/Hippotat/hippotat)
warning: use of deprecated function `<reporter::LogOpts as clap::Args>::augment_args::parse_from_occurrences`: Replaced with `#[clap(action = ArgAction::Count)]` with a field type of `u8`
  --> src/reporter.rs:18:33
   |
18 |   #[clap(long, short='D', parse(from_occurrences))]
   |                                 ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/reporter.rs