feat: update procfs

This commit is contained in:
2022-07-29 00:41:57 +08:00
parent 925f186817
commit 51b0bb96f3

View File

@@ -15,7 +15,7 @@ pub fn get_process(_port: u16) -> Option<Process> {
#[cfg(target_os = "linux")]
pub fn get_process(port: u16) -> Option<Process> {
let all_procs = match procfs::process::all_processes() {
Error(e) => {
Err(e) => {
rust_util::warning!("Get procfs all processes failed: {}", e);
return None;
}
@@ -36,7 +36,7 @@ pub fn get_process(port: u16) -> Option<Process> {
}
}
let tcp = match procfs::net::tcp() {
Error(e) => {
Err(e) => {
rust_util::warning!("Get procfs net tcp failed: {}", e);
return None;
}