From 0773b3067ee971dcae36cef1f643baea67b75083 Mon Sep 17 00:00:00 2001 From: Thayne McCombs Date: Tue, 8 Nov 2022 01:09:06 -0700 Subject: [PATCH] Fix some warnings from clippy I'm guessing these are new warnings from the Rust 1.65 release --- src/cli.rs | 2 +- src/exec/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index a470448..465473f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -807,7 +807,7 @@ impl clap::Args for Exec { .allow_hyphen_values(true) .value_terminator(";") .value_name("cmd") - .conflicts_with_all(&["exec", "list_details"]) + .conflicts_with_all(["exec", "list_details"]) .help("Execute a command with all search results at once") .long_help( "Execute the given command once, with all search results as arguments.\n\ diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 35d7b83..167368b 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -148,7 +148,7 @@ impl CommandBuilder { for arg in &template.args { if arg.has_tokens() { path_arg = Some(arg.clone()); - } else if path_arg == None { + } else if path_arg.is_none() { pre_args.push(arg.generate("", None)); } else { post_args.push(arg.generate("", None)); @@ -301,9 +301,9 @@ impl CommandTemplate { /// Using the internal `args` field, and a supplied `input` variable, a `Command` will be /// build. fn generate(&self, input: &Path, path_separator: Option<&str>) -> io::Result { - let mut cmd = Command::new(self.args[0].generate(&input, path_separator)); + let mut cmd = Command::new(self.args[0].generate(input, path_separator)); for arg in &self.args[1..] { - cmd.try_arg(arg.generate(&input, path_separator))?; + cmd.try_arg(arg.generate(input, path_separator))?; } Ok(cmd) }