mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-06 17:59:11 +00:00
fix: guard macos-ne feature with target_os = "macos" in cfg expressions (#1962)
All 13 occurrences of `any(target_os = "ios", feature = "macos-ne")` are replaced with `any(target_os = "ios", all(target_os = "macos", feature = "macos-ne"))`. Previously, enabling `macos-ne` on non-macOS platforms (e.g. `--all-features` on Linux) would incorrectly compile macOS/mobile-specific code paths, causing build failures or wrong runtime behavior. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ impl EasyTierLauncher {
|
||||
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
any(target_os = "ios", feature = "macos-ne"),
|
||||
any(target_os = "ios", all(target_os = "macos", feature = "macos-ne")),
|
||||
target_env = "ohos"
|
||||
))]
|
||||
async fn run_routine_for_mobile(
|
||||
@@ -158,7 +158,7 @@ impl EasyTierLauncher {
|
||||
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
any(target_os = "ios", feature = "macos-ne"),
|
||||
any(target_os = "ios", all(target_os = "macos", feature = "macos-ne")),
|
||||
target_env = "ohos"
|
||||
))]
|
||||
Self::run_routine_for_mobile(&instance, &data, &mut tasks).await;
|
||||
|
||||
Reference in New Issue
Block a user