Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oneofthezombies committed Feb 6, 2024
1 parent e2d0ac4 commit 42bfbff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/libs/kill_tree/src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ pub(crate) async fn get_process_info(process_id: ProcessId) -> Option<ProcessInf
return None;
}
};
let process_id_sign = match i32::try_from(process_id) {
Ok(x) => x,
Err(e) => {
debug!(error = ?e, process_id, "failed to convert process id");
return None;
}
};
let result = unsafe {
libproc::proc_pidinfo(
process_id as i32,
process_id_sign,
proc_pidtbsdinfo_sign,
0,
std::ptr::addr_of_mut!(proc_bsdinfo).cast::<c_void>(),
Expand Down

0 comments on commit 42bfbff

Please sign in to comment.