File tree Expand file tree Collapse file tree
crates/prunex-core/src/gaming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,9 +362,8 @@ pub fn activate(cfg: &GamingModeConfig) -> ActivateReport {
362362 } else {
363363 // Build the exclude set: registered games (boosted_pids)
364364 // + every PID we've already suspended so far.
365- let mut exclude: Vec < u32 > = Vec :: with_capacity (
366- snapshot. boosted_pids . len ( ) + snapshot. suspended_pids . len ( ) ,
367- ) ;
365+ let mut exclude: Vec < u32 > =
366+ Vec :: with_capacity ( snapshot. boosted_pids . len ( ) + snapshot. suspended_pids . len ( ) ) ;
368367 exclude. extend ( & snapshot. boosted_pids ) ;
369368 exclude. extend ( & snapshot. suspended_pids ) ;
370369 let result = platform:: flush_working_sets ( & exclude) ;
@@ -1335,11 +1334,9 @@ mod platform {
13351334 // close on the token via the let-binding scope.
13361335 unsafe {
13371336 let mut token = HANDLE :: default ( ) ;
1338- if let Err ( e) = OpenProcessToken (
1339- GetCurrentProcess ( ) ,
1340- TOKEN_ADJUST_PRIVILEGES ,
1341- & mut token,
1342- ) {
1337+ if let Err ( e) =
1338+ OpenProcessToken ( GetCurrentProcess ( ) , TOKEN_ADJUST_PRIVILEGES , & mut token)
1339+ {
13431340 return Err ( format ! ( "OpenProcessToken: {}" , e) ) ;
13441341 }
13451342 let priv_name: Vec < u16 > = "SeProfileSingleProcessPrivilege"
You can’t perform that action at this time.
0 commit comments