From 41bcd9c50b2d1d012d69e4096ff8f68f7e470f04 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 14 Jan 2022 11:21:03 +0800 Subject: [PATCH] fix(napi): clippy error on 1.58 --- crates/napi/src/async_work.rs | 1 + crates/napi/src/js_values/value_ref.rs | 1 + crates/napi/src/promise.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/crates/napi/src/async_work.rs b/crates/napi/src/async_work.rs index 1d54ca14..7bd123d5 100644 --- a/crates/napi/src/async_work.rs +++ b/crates/napi/src/async_work.rs @@ -85,6 +85,7 @@ pub fn run( }) } +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl Send for AsyncWork {} unsafe impl Sync for AsyncWork {} diff --git a/crates/napi/src/js_values/value_ref.rs b/crates/napi/src/js_values/value_ref.rs index 41aeb6bf..d3eafbbc 100644 --- a/crates/napi/src/js_values/value_ref.rs +++ b/crates/napi/src/js_values/value_ref.rs @@ -11,6 +11,7 @@ pub struct Ref { pub(crate) raw_value: sys::napi_value, } +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl Send for Ref {} unsafe impl Sync for Ref {} diff --git a/crates/napi/src/promise.rs b/crates/napi/src/promise.rs index cef27922..3c93f3db 100644 --- a/crates/napi/src/promise.rs +++ b/crates/napi/src/promise.rs @@ -15,6 +15,7 @@ pub struct FuturePromise Result, } +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl Result> Send for FuturePromise {