Skip to content

Commit f08a5db

Browse files
committed
Fix even more clippy lints
1 parent 81abac5 commit f08a5db

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

argh/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ pub struct ParseStructOptions<'a> {
967967
pub help_triggers: &'a [&'a str],
968968
}
969969

970-
impl<'a> ParseStructOptions<'a> {
970+
impl ParseStructOptions<'_> {
971971
/// Parse a commandline option.
972972
///
973973
/// `arg`: the current option argument being parsed (e.g. `--foo`).
@@ -1035,7 +1035,7 @@ pub struct ParseStructPositionals<'a> {
10351035
pub last_is_greedy: bool,
10361036
}
10371037

1038-
impl<'a> ParseStructPositionals<'a> {
1038+
impl ParseStructPositionals<'_> {
10391039
/// Parse the next positional argument.
10401040
///
10411041
/// `arg`: the argument supplied by the user.
@@ -1072,7 +1072,7 @@ pub struct ParseStructPositional<'a> {
10721072
pub slot: &'a mut dyn ParseValueSlot,
10731073
}
10741074

1075-
impl<'a> ParseStructPositional<'a> {
1075+
impl ParseStructPositional<'_> {
10761076
/// Parse a positional argument.
10771077
///
10781078
/// `arg`: the argument supplied by the user.
@@ -1109,7 +1109,7 @@ pub struct ParseStructSubCommand<'a> {
11091109
pub parse_func: &'a mut dyn FnMut(&[&str], &[&str]) -> Result<(), EarlyExit>,
11101110
}
11111111

1112-
impl<'a> ParseStructSubCommand<'a> {
1112+
impl ParseStructSubCommand<'_> {
11131113
fn parse(
11141114
&mut self,
11151115
help: bool,

argh/tests/args_info_tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ fn args_info_test_subcommands() {
427427
}
428428

429429
#[derive(FromArgs, ArgsInfo)]
430+
#[allow(dead_code)]
430431
#[argh(subcommand)]
431432
/// Doc comments for subcommand enums does not appear in the help text.
432433
enum SubcommandEnum {
@@ -600,6 +601,7 @@ fn args_info_test_subcommand_notes_examples() {
600601
cmd: SubcommandEnum,
601602
}
602603

604+
#[allow(dead_code)]
603605
#[derive(FromArgs, ArgsInfo)]
604606
#[argh(subcommand)]
605607
/// Doc comments for subcommand enums does not appear in the help text.

argh/tests/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,7 @@ fn redact_arg_values_subcommand() {
15931593
_means: MeansSubcommand,
15941594
}
15951595

1596+
#[allow(dead_code)]
15961597
#[derive(FromArgs, Debug)]
15971598
/// Short description
15981599
#[argh(subcommand)]
@@ -1639,6 +1640,7 @@ fn redact_arg_values_subcommand_with_space_in_name() {
16391640
_means: MeansSubcommand,
16401641
}
16411642

1643+
#[allow(dead_code)]
16421644
#[derive(FromArgs, Debug)]
16431645
/// Short description
16441646
#[argh(subcommand)]

0 commit comments

Comments
 (0)