From 7f3f1fbd0b5dee0e85fcd3283ad337d6933f0f51 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Jun 2023 20:02:30 +0100 Subject: [PATCH] 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 --- src/reporter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, } -- 2.30.2