Skip to content

Commit 8f8212c

Browse files
committed
Auto merge of #10205 - hi-rustin:rustin-patch-clippy, r=Eh2406
Make clippy happy Remove needless borrow.
2 parents bfb7f2e + 38826af commit 8f8212c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/cargo/commands/help.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ fn try_help(config: &Config) -> CargoResult<bool> {
6969
};
7070

7171
if resolve_executable(Path::new("man")).is_ok() {
72-
let man = match extract_man(&subcommand, "1") {
72+
let man = match extract_man(subcommand, "1") {
7373
Some(man) => man,
7474
None => return Ok(false),
7575
};
76-
write_and_spawn(&subcommand, &man, "man")?;
76+
write_and_spawn(subcommand, &man, "man")?;
7777
} else {
78-
let txt = match extract_man(&subcommand, "txt") {
78+
let txt = match extract_man(subcommand, "txt") {
7979
Some(txt) => txt,
8080
None => return Ok(false),
8181
};
8282
if resolve_executable(Path::new("less")).is_ok() {
83-
write_and_spawn(&subcommand, &txt, "less")?;
83+
write_and_spawn(subcommand, &txt, "less")?;
8484
} else if resolve_executable(Path::new("more")).is_ok() {
85-
write_and_spawn(&subcommand, &txt, "more")?;
85+
write_and_spawn(subcommand, &txt, "more")?;
8686
} else {
8787
drop(std::io::stdout().write_all(&txt));
8888
}

0 commit comments

Comments
 (0)