chiark / gitweb /
clap: use value_parser
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 19:02:30 +0000 (20:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Jun 2023 20:15:29 +0000 (21:15 +0100)
commit7f3f1fbd0b5dee0e85fcd3283ad337d6933f0f51
treef3c4da6b9bed1d4df6cd58949db3d90580821c61
parent92cd28d2c0412a49aba653b9f0968d2bc4431285
clap: use value_parser

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

    warning: use of deprecated function `<reporter::LogOpts as clap::Args>::augment_args::parse_try_from_str`: Replaced with `#[clap(value_parser = ...)]`
      --> src/reporter.rs:22:35
       |
    22 |   #[clap(long, parse(try_from_str=parse_syslog_facility))]
       |                                   ^^^^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(deprecated)]` on by default

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