From 134707ef1d1dcf1602e7730f4528195679c79a83 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 26 Jan 2024 10:27:17 +0800 Subject: [PATCH] fix(napi): callback in execute_tokio_future does not need to be Send (#1917) The resolver does not need to be `Send` or `Sync`, because it's assumed to be called from the same thread that the JavaScript thread is running on. --- crates/napi/src/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/napi/src/env.rs b/crates/napi/src/env.rs index b5fb5820..ff50b599 100644 --- a/crates/napi/src/env.rs +++ b/crates/napi/src/env.rs @@ -1087,7 +1087,7 @@ impl Env { T: 'static + Send, V: 'static + ToNapiValue, F: 'static + Send + Future>, - R: 'static + Send + FnOnce(&mut Env, T) -> Result, + R: 'static + FnOnce(&mut Env, T) -> Result, >( &self, fut: F,