parent
b5f3585d2e
commit
74f881f20d
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -55,6 +55,13 @@ jobs:
|
|||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
||||||
|
|
||||||
|
- name: Check wasm
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
override: true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use std::{
|
use std::{
|
||||||
future::Future,
|
future::Future,
|
||||||
mem,
|
mem,
|
||||||
pin::Pin,
|
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -63,10 +62,12 @@ impl TaskPool {
|
|||||||
F: FnOnce(&mut Scope<'scope, T>) + 'scope + Send,
|
F: FnOnce(&mut Scope<'scope, T>) + 'scope + Send,
|
||||||
T: Send + 'static,
|
T: Send + 'static,
|
||||||
{
|
{
|
||||||
let executor = async_executor::LocalExecutor::new();
|
let executor = &async_executor::LocalExecutor::new();
|
||||||
|
let executor: &'scope async_executor::LocalExecutor<'scope> =
|
||||||
|
unsafe { mem::transmute(executor) };
|
||||||
|
|
||||||
let mut scope = Scope {
|
let mut scope = Scope {
|
||||||
executor: &executor,
|
executor,
|
||||||
results: Vec::new(),
|
results: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user