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"
136
136
similar = " 2.7.0"
137
137
spinners = " 4.1.0"
138
138
strum = { version = " 0.27.1" , features = [" derive" ] }
139
- sysinfo = " 0.32.0 "
139
+ sysinfo = " 0.33.1 "
140
140
thiserror = " 2.0.12"
141
141
tempfile = " 3.18.0"
142
142
time = { 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) {
742
742
use tokio:: process:: Command ;
743
743
744
744
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 ( ) ) )
746
746
} ) ;
747
747
let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
748
748
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(
244
244
}
245
245
246
246
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 ) ) ,
248
248
) ;
249
249
let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
250
250
let processes = system. processes_by_exact_name ( & app_process_name) ;
@@ -299,7 +299,7 @@ async fn allow_multiple_running_check(
299
299
use std:: ffi:: OsString ;
300
300
301
301
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 ( ) ) ) ;
303
303
let processes = system. processes_by_name ( & app_process_name) ;
304
304
let current_uid = nix:: unistd:: getuid ( ) . as_raw ( ) ;
305
305
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ pub struct SystemInfo {
103
103
impl SystemInfo {
104
104
fn new ( ) -> SystemInfo {
105
105
let system = sysinfo:: System :: new_with_specifics (
106
- RefreshKind :: new ( )
106
+ RefreshKind :: nothing ( )
107
107
. with_cpu ( CpuRefreshKind :: everything ( ) )
108
108
. with_memory ( MemoryRefreshKind :: everything ( ) ) ,
109
109
) ;
Original file line number Diff line number Diff line change @@ -306,7 +306,8 @@ impl DoctorCheck<LinuxContext> for IBusRunningCheck {
306
306
RefreshKind ,
307
307
} ;
308
308
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 ( ) ) ) ;
310
311
let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
311
312
312
313
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 {
626
626
use tokio:: process:: Command ;
627
627
628
628
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 ( ) ) )
630
630
} ) ;
631
631
let ibus_daemon = OsString :: from ( "ibus-daemon" ) ;
632
632
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 {
49
49
50
50
// Fallback to process name check
51
51
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 ( ) ) ) ;
53
53
let mut processes = system. processes_by_exact_name ( & app_process_name) ;
54
54
processes. next ( ) . is_some ( )
55
55
}
@@ -83,7 +83,7 @@ pub fn desktop_app_running() -> bool {
83
83
System ,
84
84
} ;
85
85
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 ( ) ) ) ;
87
87
let app_process_name = OsString :: from ( APP_PROCESS_NAME ) ;
88
88
let mut processes = s. processes_by_exact_name ( & app_process_name) ;
89
89
processes. next ( ) . is_some ( )
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ mod tests {
346
346
} ;
347
347
348
348
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 ( ) ) ) ;
350
350
cfg_if ! {
351
351
if #[ cfg( windows) ] {
352
352
let mut processes = system. processes_by_name( & app_process_name) ;
You can’t perform that action at this time.
0 commit comments