From ca213922d043a5532d9ab352c0d54bfca7563871 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 5 Feb 2020 04:14:26 +0100 Subject: Drop `Send` in `Command` and `Executor` on Wasm --- src/executor.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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 + Send + 'static, - ) { + fn spawn(&self, future: impl futures::Future + 'static) { self.0.spawn(future); } } -- cgit