fix: Fix sysinfo >=0.29.1 crashing the main view on macOS

This commit is contained in:
Dennis Ploeger
2023-11-08 08:59:27 +01:00
parent 7bafe142ca
commit b9bd79895f
5 changed files with 233 additions and 136 deletions

View File

@@ -596,7 +596,7 @@ async fn check_pid(postfix: &str) {
file.read_to_string(&mut content).ok();
let pid = content.parse::<usize>().unwrap_or(0);
if pid > 0 {
use hbb_common::sysinfo::{ProcessExt, System, SystemExt};
use hbb_common::sysinfo::{System};
let mut sys = System::new();
sys.refresh_processes();
if let Some(p) = sys.process(pid.into()) {