summaryrefslogtreecommitdiffstats
path: root/futures/src/executor
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-02-06 10:21:52 -0600
committerLibravatar GitHub <noreply@github.com>2020-02-06 10:21:52 -0600
commit97c308076ff93d09eb874f8e954aae4c7c5deaf7 (patch)
treec3a4ec76931c8153c932c364fa393e25d39d74f0 /futures/src/executor
parent7b892eb3e11596925a2993bcc4175ac09ff3768a (diff)
parent36e617ae70cc7a86ce998cbd61f6aa702bb42933 (diff)
downloadiced-97c308076ff93d09eb874f8e954aae4c7c5deaf7.tar.gz
iced-97c308076ff93d09eb874f8e954aae4c7c5deaf7.tar.bz2
iced-97c308076ff93d09eb874f8e954aae4c7c5deaf7.zip
Merge pull request #180 from hecrj/feature/web-styling
Custom styling for `iced_web`
Diffstat (limited to 'futures/src/executor')
-rw-r--r--futures/src/executor/null.rs4
-rw-r--r--futures/src/executor/wasm_bindgen.rs5
2 files changed, 5 insertions, 4 deletions
diff --git a/futures/src/executor/null.rs b/futures/src/executor/null.rs
index 6d5cf982..65e2e2df 100644
--- a/futures/src/executor/null.rs
+++ b/futures/src/executor/null.rs
@@ -11,5 +11,9 @@ impl Executor for Null {
Ok(Self)
}
+ #[cfg(not(target_arch = "wasm32"))]
fn spawn(&self, _future: impl Future<Output = ()> + Send + 'static) {}
+
+ #[cfg(target_arch = "wasm32")]
+ fn spawn(&self, _future: impl Future<Output = ()> + 'static) {}
}
diff --git a/futures/src/executor/wasm_bindgen.rs b/futures/src/executor/wasm_bindgen.rs
index 69b7c7e2..94d694c8 100644
--- a/futures/src/executor/wasm_bindgen.rs
+++ b/futures/src/executor/wasm_bindgen.rs
@@ -9,10 +9,7 @@ impl Executor for WasmBindgen {
Ok(Self)
}
- fn spawn(
- &self,
- future: impl futures::Future<Output = ()> + Send + 'static,
- ) {
+ fn spawn(&self, future: impl futures::Future<Output = ()> + 'static) {
wasm_bindgen_futures::spawn_local(future);
}
}