summaryrefslogtreecommitdiffstats
path: root/futures/src/runtime.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-05 04:14:26 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-05 04:14:26 +0100
commitca213922d043a5532d9ab352c0d54bfca7563871 (patch)
treeee4ce50991d974144e23030d31ffb11b975cb603 /futures/src/runtime.rs
parent9a06e481b7f52a9d8e123c909d5614332f607c53 (diff)
downloadiced-ca213922d043a5532d9ab352c0d54bfca7563871.tar.gz
iced-ca213922d043a5532d9ab352c0d54bfca7563871.tar.bz2
iced-ca213922d043a5532d9ab352c0d54bfca7563871.zip
Drop `Send` in `Command` and `Executor` on Wasm
Diffstat (limited to '')
-rw-r--r--futures/src/runtime.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/futures/src/runtime.rs b/futures/src/runtime.rs
index 3be45a26..ede529dc 100644
--- a/futures/src/runtime.rs
+++ b/futures/src/runtime.rs
@@ -73,11 +73,13 @@ where
for future in futures {
let mut sender = self.sender.clone();
- self.executor.spawn(future.then(|message| async move {
+ let future = future.then(|message| async move {
let _ = sender.send(message).await;
()
- }));
+ });
+
+ self.executor.spawn(future);
}
}