Skip to content

Commit 9e88f91

Browse files
authored
Merge pull request #1168 from tmccombs/clippy-fixes-2
Fix some warnings from clippy
2 parents bba7e0a + 0773b30 commit 9e88f91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ impl clap::Args for Exec {
807807
.allow_hyphen_values(true)
808808
.value_terminator(";")
809809
.value_name("cmd")
810-
.conflicts_with_all(&["exec", "list_details"])
810+
.conflicts_with_all(["exec", "list_details"])
811811
.help("Execute a command with all search results at once")
812812
.long_help(
813813
"Execute the given command once, with all search results as arguments.\n\

src/exec/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl CommandBuilder {
148148
for arg in &template.args {
149149
if arg.has_tokens() {
150150
path_arg = Some(arg.clone());
151-
} else if path_arg == None {
151+
} else if path_arg.is_none() {
152152
pre_args.push(arg.generate("", None));
153153
} else {
154154
post_args.push(arg.generate("", None));
@@ -301,9 +301,9 @@ impl CommandTemplate {
301301
/// Using the internal `args` field, and a supplied `input` variable, a `Command` will be
302302
/// build.
303303
fn generate(&self, input: &Path, path_separator: Option<&str>) -> io::Result<Command> {
304-
let mut cmd = Command::new(self.args[0].generate(&input, path_separator));
304+
let mut cmd = Command::new(self.args[0].generate(input, path_separator));
305305
for arg in &self.args[1..] {
306-
cmd.try_arg(arg.generate(&input, path_separator))?;
306+
cmd.try_arg(arg.generate(input, path_separator))?;
307307
}
308308
Ok(cmd)
309309
}

0 commit comments

Comments
 (0)