Ensure PARALLEL clauses don’t run on WASM

This commit is contained in:
Tobie Morgan Hitchcock 2022-07-06 14:40:43 +01:00
parent f73ecebba1
commit 3417d152e0

View file

@ -329,7 +329,8 @@ impl Iterator {
Ok(()) Ok(())
} }
#[cfg(not(feature = "parallel"))] #[cfg(any(target_arch = "wasm32", not(feature = "parallel")))]
#[cfg_attr(feature = "parallel", async_recursion)]
#[cfg_attr(not(feature = "parallel"), async_recursion(?Send))] #[cfg_attr(not(feature = "parallel"), async_recursion(?Send))]
async fn iterate( async fn iterate(
&mut self, &mut self,
@ -346,8 +347,9 @@ impl Iterator {
Ok(()) Ok(())
} }
#[cfg(feature = "parallel")] #[cfg(all(feature = "parallel", not(target_arch = "wasm32")))]
#[cfg_attr(feature = "parallel", async_recursion)] #[cfg_attr(feature = "parallel", async_recursion)]
#[cfg_attr(not(feature = "parallel"), async_recursion(?Send))]
async fn iterate( async fn iterate(
&mut self, &mut self,
ctx: &Context<'_>, ctx: &Context<'_>,