fix(clippy): Restrict 2 imports to macOS only (#7858)

* fix(clippy): Remove 2 unused imports

- Drop 2 unused imports according to clippy suggestions

* fix(clippy): Re-add 2 imports and limit to macOS

- Those "unused imports" are only for Windows and Linux
- macOS environment requires those identifiers
This commit is contained in:
❤是纱雾酱哟~
2026-09-03 22:31:19 +00:00
committed by GitHub
parent c0c1fbcfc2
commit a640010bc3
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -1078,7 +1078,10 @@ mod tests {
assert_eq!(refusal_classification(None), SysproxyFailure::PrivilegeRequired);
}
use super::{SystemProxyStateUnknown, is_reportable_given, rollback_failure, service_apply_result};
use super::{SystemProxyStateUnknown, is_reportable_given, rollback_failure};
#[cfg(target_os = "macos")]
use super::service_apply_result;
#[cfg(target_os = "macos")]
#[test]
+4 -1
View File
@@ -574,12 +574,15 @@ mod tests {
AuthoritativeState, BYPASS_SEPARATOR, DEFAULT_BYPASS, OsProxyState, ProxyApplyStep, SystemProxyStateUnknown,
authoritative_state, authoritative_state_from, classify_os_proxy_state, disable_both,
disable_until_the_last_write_is_ours, first_failure, format_bypass, proxy_apply_steps,
recover_from_failed_write, skip_without_network_service, target_is_already_in_place,
recover_from_failed_write, target_is_already_in_place,
};
use parking_lot::Mutex;
use std::collections::VecDeque;
use sysproxy::{Autoproxy, Sysproxy};
#[cfg(target_os = "macos")]
use super::skip_without_network_service;
#[cfg(target_os = "macos")]
#[test]
fn a_machine_with_no_network_service_has_nothing_to_turn_off() {