Avoid attaching devtools on Wasm

This commit is contained in:
Héctor Ramón Jiménez 2025-04-09 23:03:01 +02:00
parent 208de5578c
commit 183fb8a659
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 4 additions and 4 deletions

View file

@ -169,10 +169,10 @@ impl<P: Program> Application<P> {
where
Self: 'static,
{
#[cfg(feature = "debug")]
#[cfg(all(feature = "debug", not(target_arch = "wasm32")))]
let program = iced_devtools::attach(self.raw);
#[cfg(not(feature = "debug"))]
#[cfg(any(not(feature = "debug"), target_arch = "wasm32"))]
let program = self.raw;
Ok(shell::run(program, self.settings, Some(self.window))?)

View file

@ -117,10 +117,10 @@ impl<P: Program> Daemon<P> {
where
Self: 'static,
{
#[cfg(feature = "debug")]
#[cfg(all(feature = "debug", not(target_arch = "wasm32")))]
let program = iced_devtools::attach(self.raw);
#[cfg(not(feature = "debug"))]
#[cfg(any(not(feature = "debug"), target_arch = "wasm32"))]
let program = self.raw;
Ok(shell::run(program, self.settings, None)?)