Skip to content

Commit

Permalink
Fix even more clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
sadmac7000 committed Dec 20, 2024
1 parent 81abac5 commit f08a5db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions argh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions argh/tests/args_info_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions argh/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,7 @@ fn redact_arg_values_subcommand() {
_means: MeansSubcommand,
}

#[allow(dead_code)]
#[derive(FromArgs, Debug)]
/// Short description
#[argh(subcommand)]
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit f08a5db

Please sign in to comment.