summaryrefslogtreecommitdiffstats
path: root/src/executor.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 /src/executor.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 'src/executor.rs')
-rw-r--r--src/executor.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/executor.rs b/src/executor.rs
index cbbd8283..539bfd5d 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -9,7 +9,8 @@ mod platform {
/// A default cross-platform executor.
///
- /// - On native platforms, it will use a `iced_futures::executor::ThreadPool`.
+ /// - On native platforms, it will use a
+ /// `iced_futures::executor::ThreadPool`.
/// - On the Web, it will use `iced_futures::executor::WasmBindgen`.
#[derive(Debug)]
pub struct Default(ThreadPool);
@@ -34,7 +35,8 @@ mod platform {
/// A default cross-platform executor.
///
- /// - On native platforms, it will use a `iced_futures::executor::ThreadPool`.
+ /// - On native platforms, it will use a
+ /// `iced_futures::executor::ThreadPool`.
/// - On the Web, it will use `iced_futures::executor::WasmBindgen`.
#[derive(Debug)]
pub struct Default(WasmBindgen);
@@ -44,10 +46,7 @@ mod platform {
Ok(Default(WasmBindgen::new()?))
}
- fn spawn(
- &self,
- future: impl futures::Future<Output = ()> + Send + 'static,
- ) {
+ fn spawn(&self, future: impl futures::Future<Output = ()> + 'static) {
self.0.spawn(future);
}
}