Merge pull request #1029 from napi-rs/fix-clippy

fix(napi): clippy error on 1.58
This commit is contained in:
LongYinan 2022-01-14 11:48:25 +08:00 committed by GitHub
commit cbbccf2084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View file

@ -85,6 +85,7 @@ pub fn run<T: Task>(
})
}
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<T: Task> Send for AsyncWork<T> {}
unsafe impl<T: Task> Sync for AsyncWork<T> {}

View file

@ -11,6 +11,7 @@ pub struct Ref<T> {
pub(crate) raw_value: sys::napi_value,
}
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<T> Send for Ref<T> {}
unsafe impl<T> Sync for Ref<T> {}

View file

@ -15,6 +15,7 @@ pub struct FuturePromise<Data, Resolver: FnOnce(sys::napi_env, Data) -> Result<s
_data: PhantomData<Data>,
}
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<T, F: FnOnce(sys::napi_env, T) -> Result<sys::napi_value>> Send
for FuturePromise<T, F>
{