diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index f5b4c05ae..15da73a78 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -2069,10 +2069,7 @@ fn default_window_label() -> String { } fn default_width() -> Option { - // the config is generated by a proc macro, so we have to check CARGO_CFG_TARGET_OS since proc macros run on the host target - if cfg!(any(target_os = "ios", target_os = "android")) - || std::env::var("CARGO_CFG_TARGET_OS").map_or(false, |os| os == "ios" || os == "android") - { + if cfg!(any(target_os = "ios", target_os = "android")) { None } else { Some(800.) @@ -2080,10 +2077,7 @@ fn default_width() -> Option { } fn default_height() -> Option { - // the config is generated by a proc macro, so we have to check CARGO_CFG_TARGET_OS since proc macros run on the host target - if cfg!(any(target_os = "ios", target_os = "android")) - || std::env::var("CARGO_CFG_TARGET_OS").map_or(false, |os| os == "ios" || os == "android") - { + if cfg!(any(target_os = "ios", target_os = "android")) { None } else { Some(600.)