Drop Send in Command and Executor on Wasm
This commit is contained in:
parent
9a06e481b7
commit
ca213922d0
8 changed files with 232 additions and 111 deletions
|
|
@ -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) {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue