fix(config): restrict restart_core_needed mutability to non-Windows to avoid unused-mut

This commit is contained in:
Slinetrac
2025-12-28 09:45:54 +08:00
parent c41db51f81
commit 895e54f7ec

View File

@@ -112,6 +112,14 @@ fn determine_update_flags(patch: &IVerge) -> UpdateFlags {
let enable_proxy_guard = patch.enable_proxy_guard;
let proxy_guard_duration = patch.proxy_guard_duration;
#[cfg(target_os = "windows")]
let restart_core_needed = socks_enabled.is_some()
|| http_enabled.is_some()
|| socks_port.is_some()
|| http_port.is_some()
|| mixed_port.is_some()
|| enable_external_controller.is_some();
#[cfg(not(target_os = "windows"))]
let mut restart_core_needed = socks_enabled.is_some()
|| http_enabled.is_some()
|| socks_port.is_some()