From 3417d152e0f52f23f0417794986f72d0ab7514dd Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 6 Jul 2022 14:40:43 +0100 Subject: [PATCH] =?UTF-8?q?Ensure=20PARALLEL=20clauses=20don=E2=80=99t=20r?= =?UTF-8?q?un=20on=20WASM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/dbs/iterator.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/dbs/iterator.rs b/lib/src/dbs/iterator.rs index 89bec676..c35b5b30 100644 --- a/lib/src/dbs/iterator.rs +++ b/lib/src/dbs/iterator.rs @@ -329,7 +329,8 @@ impl Iterator { 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))] async fn iterate( &mut self, @@ -346,8 +347,9 @@ impl Iterator { Ok(()) } - #[cfg(feature = "parallel")] + #[cfg(all(feature = "parallel", not(target_arch = "wasm32")))] #[cfg_attr(feature = "parallel", async_recursion)] + #[cfg_attr(not(feature = "parallel"), async_recursion(?Send))] async fn iterate( &mut self, ctx: &Context<'_>,