File tree Expand file tree Collapse file tree 9 files changed +19
-32
lines changed
Expand file tree Collapse file tree 9 files changed +19
-32
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ shlex = "1.3.0"
136136similar = " 2.7.0"
137137spinners = " 4.1.0"
138138strum = { version = " 0.27.1" , features = [" derive" ] }
139- sysinfo = " 0.32.0 "
139+ sysinfo = " 0.33.1 "
140140thiserror = " 2.0.12"
141141tempfile = " 3.18.0"
142142time = { version = " 0.3.39" , features = [
Original file line number Diff line number Diff line change @@ -742,7 +742,7 @@ async fn launch_ibus(ctx: &Context) {
742742 use tokio:: process:: Command ;
743743
744744 let system = tokio:: task:: block_in_place ( || {
745- System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) )
745+ System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) )
746746 } ) ;
747747 let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
748748 if system. processes_by_name ( & ibus_daemon) . next ( ) . is_none ( ) {
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ async fn allow_multiple_running_check(
244244 }
245245
246246 let system = System :: new_with_specifics (
247- RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) . with_user ( sysinfo:: UpdateKind :: Always ) ) ,
247+ RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) . with_user ( sysinfo:: UpdateKind :: Always ) ) ,
248248 ) ;
249249 let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
250250 let processes = system. processes_by_exact_name ( & app_process_name) ;
@@ -299,7 +299,7 @@ async fn allow_multiple_running_check(
299299 use std:: ffi:: OsString ;
300300
301301 let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
302- let system = System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) ) ;
302+ let system = System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) ) ;
303303 let processes = system. processes_by_name ( & app_process_name) ;
304304 let current_uid = nix:: unistd:: getuid ( ) . as_raw ( ) ;
305305
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ pub struct SystemInfo {
103103impl SystemInfo {
104104 fn new ( ) -> SystemInfo {
105105 let system = sysinfo:: System :: new_with_specifics (
106- RefreshKind :: new ( )
106+ RefreshKind :: nothing ( )
107107 . with_cpu ( CpuRefreshKind :: everything ( ) )
108108 . with_memory ( MemoryRefreshKind :: everything ( ) ) ,
109109 ) ;
Original file line number Diff line number Diff line change @@ -306,7 +306,8 @@ impl DoctorCheck<LinuxContext> for IBusRunningCheck {
306306 RefreshKind ,
307307 } ;
308308
309- let system = sysinfo:: System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) ) ;
309+ let system =
310+ sysinfo:: System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) ) ;
310311 let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
311312
312313 if system. processes_by_exact_name ( & ibus_daemon) . next ( ) . is_none ( ) {
Original file line number Diff line number Diff line change @@ -626,7 +626,7 @@ impl InternalSubcommand {
626626 use tokio:: process:: Command ;
627627
628628 let system = tokio:: task:: block_in_place ( || {
629- System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) )
629+ System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) )
630630 } ) ;
631631 let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
632632 if system. processes_by_name ( & ibus_daemon) . next ( ) . is_none ( ) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub fn desktop_app_running() -> bool {
4949
5050 // Fallback to process name check
5151 let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
52- let system = System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) ) ;
52+ let system = System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) ) ;
5353 let mut processes = system. processes_by_exact_name ( & app_process_name) ;
5454 processes. next ( ) . is_some ( )
5555}
@@ -83,7 +83,7 @@ pub fn desktop_app_running() -> bool {
8383 System ,
8484 } ;
8585
86- let s = System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) ) ;
86+ let s = System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) ) ;
8787 let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
8888 let mut processes = s. processes_by_exact_name ( & app_process_name) ;
8989 processes. next ( ) . is_some ( )
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ mod tests {
346346 } ;
347347
348348 let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
349- let system = System :: new_with_specifics ( RefreshKind :: new ( ) . with_processes ( ProcessRefreshKind :: new ( ) ) ) ;
349+ let system = System :: new_with_specifics ( RefreshKind :: nothing ( ) . with_processes ( ProcessRefreshKind :: nothing ( ) ) ) ;
350350 cfg_if ! {
351351 if #[ cfg( windows) ] {
352352 let mut processes = system. processes_by_name( & app_process_name) ;
You can’t perform that action at this time.
0 commit comments