diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 14:52:22 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:40:40 +0200 |
commit | 94a361d7da8db72c76f0b7c3d1546be5d17c292a (patch) | |
tree | ae5872bd4a37dc0523e16487781face2a309c604 | |
parent | ad2349b43cf01ccfae3652805c20fdc4e8dc907a (diff) |
Fix clippy: Remove unnecessary binding
This fixes clippy::let_and_return.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | plugins/tedge_apt_plugin/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/tedge_apt_plugin/src/main.rs b/plugins/tedge_apt_plugin/src/main.rs index ed221d39..f848b609 100644 --- a/plugins/tedge_apt_plugin/src/main.rs +++ b/plugins/tedge_apt_plugin/src/main.rs @@ -73,7 +73,7 @@ fn run(operation: PluginOp) -> Result<ExitStatus, InternalError> { // apt output = openssl/focal-security,now 1.1.1f-1ubuntu2.3 amd64 [installed] // awk -F '[/ ]' = $1 ^ $2 ^ $3 ^ $4 // awk print = name ^ ^ version ^ - let status = Command::new("awk") + Command::new("awk") .args(vec![ "-F", "[/ ]", @@ -81,9 +81,7 @@ fn run(operation: PluginOp) -> Result<ExitStatus, InternalError> { ]) .stdin(apt.stdout.unwrap()) // Cannot panic: apt.stdout has been set .status() - .map_err(|err| InternalError::exec_error("awk", err))?; - - status + .map_err(|err| InternalError::exec_error("awk", err))? } PluginOp::Install { |