diff --git a/argh/src/lib.rs b/argh/src/lib.rs index d56d1f0..998a4eb 100644 --- a/argh/src/lib.rs +++ b/argh/src/lib.rs @@ -967,7 +967,7 @@ pub struct ParseStructOptions<'a> { pub help_triggers: &'a [&'a str], } -impl<'a> ParseStructOptions<'a> { +impl ParseStructOptions<'_> { /// Parse a commandline option. /// /// `arg`: the current option argument being parsed (e.g. `--foo`). @@ -1035,7 +1035,7 @@ pub struct ParseStructPositionals<'a> { pub last_is_greedy: bool, } -impl<'a> ParseStructPositionals<'a> { +impl ParseStructPositionals<'_> { /// Parse the next positional argument. /// /// `arg`: the argument supplied by the user. @@ -1072,7 +1072,7 @@ pub struct ParseStructPositional<'a> { pub slot: &'a mut dyn ParseValueSlot, } -impl<'a> ParseStructPositional<'a> { +impl ParseStructPositional<'_> { /// Parse a positional argument. /// /// `arg`: the argument supplied by the user. @@ -1109,7 +1109,7 @@ pub struct ParseStructSubCommand<'a> { pub parse_func: &'a mut dyn FnMut(&[&str], &[&str]) -> Result<(), EarlyExit>, } -impl<'a> ParseStructSubCommand<'a> { +impl ParseStructSubCommand<'_> { fn parse( &mut self, help: bool, diff --git a/argh/tests/args_info_tests.rs b/argh/tests/args_info_tests.rs index 1fc0730..58e2cda 100644 --- a/argh/tests/args_info_tests.rs +++ b/argh/tests/args_info_tests.rs @@ -427,6 +427,7 @@ fn args_info_test_subcommands() { } #[derive(FromArgs, ArgsInfo)] + #[allow(dead_code)] #[argh(subcommand)] /// Doc comments for subcommand enums does not appear in the help text. enum SubcommandEnum { @@ -600,6 +601,7 @@ fn args_info_test_subcommand_notes_examples() { cmd: SubcommandEnum, } + #[allow(dead_code)] #[derive(FromArgs, ArgsInfo)] #[argh(subcommand)] /// Doc comments for subcommand enums does not appear in the help text. diff --git a/argh/tests/lib.rs b/argh/tests/lib.rs index 8119917..6a54ac3 100644 --- a/argh/tests/lib.rs +++ b/argh/tests/lib.rs @@ -1593,6 +1593,7 @@ fn redact_arg_values_subcommand() { _means: MeansSubcommand, } + #[allow(dead_code)] #[derive(FromArgs, Debug)] /// Short description #[argh(subcommand)] @@ -1639,6 +1640,7 @@ fn redact_arg_values_subcommand_with_space_in_name() { _means: MeansSubcommand, } + #[allow(dead_code)] #[derive(FromArgs, Debug)] /// Short description #[argh(subcommand)]