mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: simplify mutable reference handling in with_lightweight_status function
This commit is contained in:
@@ -25,7 +25,7 @@ where
|
|||||||
let app_handle = handle::Handle::global().app_handle().unwrap();
|
let app_handle = handle::Handle::global().app_handle().unwrap();
|
||||||
let state = app_handle.state::<Mutex<LightWeightState>>();
|
let state = app_handle.state::<Mutex<LightWeightState>>();
|
||||||
let mut guard = state.lock().unwrap();
|
let mut guard = state.lock().unwrap();
|
||||||
f(&mut *guard)
|
f(&mut guard)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_once_auto_lightweight() {
|
pub fn run_once_auto_lightweight() {
|
||||||
|
|||||||
Reference in New Issue
Block a user