From: Ian Jackson Date: Thu, 15 Jun 2023 19:02:30 +0000 (+0100) Subject: clap: use value_parser X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=7f3f1fbd0b5dee0e85fcd3283ad337d6933f0f51;p=hippotat.git clap: use value_parser Removes a deprecation warning (this is recommended by the clap 3 to 4 migration guide). warning: use of deprecated function `::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 --- diff --git a/src/reporter.rs b/src/reporter.rs index cc2d098..599c146 100644 --- a/src/reporter.rs +++ b/src/reporter.rs @@ -19,7 +19,7 @@ pub struct LogOpts { debug: u8, /// Syslog facility to use - #[clap(long, parse(try_from_str=parse_syslog_facility))] + #[clap(long, value_parser=parse_syslog_facility)] syslog_facility: Option, }