Skip to content

Commit 28a5f03

Browse files
committed
chore: apply clippy
1 parent dff623a commit 28a5f03

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/libs/kill_tree/src/linux.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ fn parse_status(process_id: ProcessId, status_path: String, status: String) -> R
8787
})
8888
}
8989

90-
fn parse_proc_entry(process_id: ProcessId, path: std::path::PathBuf) -> Result<std::path::PathBuf> {
90+
fn parse_proc_entry(
91+
process_id: ProcessId,
92+
path: &std::path::PathBuf,
93+
) -> Result<std::path::PathBuf> {
9194
if !path.is_dir() {
9295
return Err(Error::InvalidProcEntry {
9396
process_id,
@@ -163,7 +166,7 @@ pub(crate) mod blocking {
163166

164167
#[instrument]
165168
fn get_process_info(process_id: ProcessId, path: std::path::PathBuf) -> Result<ProcessInfo> {
166-
let status_path = parse_proc_entry(process_id, path)?;
169+
let status_path = parse_proc_entry(process_id, &path)?;
167170
let status = match std::fs::read_to_string(&status_path) {
168171
Ok(x) => x,
169172
Err(e) => {
@@ -225,7 +228,7 @@ pub(crate) mod tokio {
225228
process_id: ProcessId,
226229
path: std::path::PathBuf,
227230
) -> Result<ProcessInfo> {
228-
let status_path = parse_proc_entry(process_id, path)?;
231+
let status_path = parse_proc_entry(process_id, &path)?;
229232
let status = match ::tokio::fs::read_to_string(&status_path).await {
230233
Ok(x) => x,
231234
Err(e) => {

0 commit comments

Comments
 (0)