summaryrefslogtreecommitdiffstats
path: root/src/app/process_killer.rs
diff options
context:
space:
mode:
authorYuri Astrakhan <yuriastrakhan@gmail.com>2023-11-15 03:47:22 -0500
committerGitHub <noreply@github.com>2023-11-15 03:47:22 -0500
commit5eb4fbde5d7e41cd39dcb7c95e1bbf542e706cb0 (patch)
tree13b0ba47b78190b294b54d05eb4821306a6687f3 /src/app/process_killer.rs
parenta6200640b9a074feb116b7808543c8cb73c8dd30 (diff)
chore: fix certain uninlined string format uses (#1310)
* Fixed uninlined args First ran this, and fixed a few more similar issues by hand ``` cargo clippy --workspace --fix --benches --tests --bins -- -A clippy::all -W clippy::uninlined_format_args ``` Note that in a few cases, format args were passed by ref - which is actually a tiny perf hit - compiler would not be able to optimize them. * revert change here since it contains a non-inlineable variable I'm not a fan of using it partially here * revert given the other formats above/below I would prefer keeping it like this --------- Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
Diffstat (limited to 'src/app/process_killer.rs')
-rw-r--r--src/app/process_killer.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/app/process_killer.rs b/src/app/process_killer.rs
index 106419ee..c68b81ab 100644
--- a/src/app/process_killer.rs
+++ b/src/app/process_killer.rs
@@ -75,14 +75,10 @@ pub fn kill_process_given_pid(pid: Pid, signal: usize) -> crate::utils::error::R
return if let Some(err_code) = err_code {
Err(BottomError::GenericError(format!(
- "Error code {} - {}",
- err_code, err,
+ "Error code {err_code} - {err}"
)))
} else {
- Err(BottomError::GenericError(format!(
- "Error code ??? - {}",
- err,
- )))
+ Err(BottomError::GenericError(format!("Error code ??? - {err}")))
};
}