From 0253d9bee0db51e38d7e419671de3bf9ffad2430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Tue, 11 Mar 2025 02:51:05 +0100 Subject: [PATCH] Remove `open` dependency for `tour` on Wasm --- examples/tour/Cargo.toml | 3 +-- examples/tour/src/main.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tour/Cargo.toml b/examples/tour/Cargo.toml index 959ade43..de9cc724 100644 --- a/examples/tour/Cargo.toml +++ b/examples/tour/Cargo.toml @@ -9,10 +9,9 @@ publish = false iced.workspace = true iced.features = ["image", "debug"] -open = "5" - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tracing-subscriber = "0.3" +open = "5" [target.'cfg(target_arch = "wasm32")'.dependencies] iced.workspace = true diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 49abd3d7..060cd6d0 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -134,6 +134,7 @@ impl Tour { self.toggler = toggler; } Message::OpenTrunk => { + #[cfg(not(target_arch = "wasm32"))] let _ = open::that_in_background("https://trunkrs.dev"); } }