summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Rombaut <benjamin.rombaut@gmail.com>2022-11-16 20:14:40 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2022-11-19 15:13:30 +0100
commita2e85a25b67eed59ee69e4387a1a645c0694ffe7 (patch)
tree1ea8039acf7b6f39f6b0f695924c8a5af7395924
parent95890b968ac9bf7ca6f7d10981b01846b1a1b243 (diff)
remove unneeded var
-rw-r--r--src/command.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/command.rs b/src/command.rs
index 8017931..ef636ac 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -154,9 +154,8 @@ impl<'a> Commands<'a> {
bail!("Duplicate parameter names: {}", &duplicates.join(", "));
}
}
- let command_list = command_strings;
- let dimensions: Vec<usize> = std::iter::once(command_list.len())
+ let dimensions: Vec<usize> = std::iter::once(command_strings.len())
.chain(
param_names_and_values
.iter()
@@ -197,7 +196,7 @@ impl<'a> Commands<'a> {
.collect();
commands.push(Command::new_parametrized(
name,
- command_list[*command_index],
+ command_strings[*command_index],
parameters,
));