Skip to content

Commit

Permalink
Merge pull request #1029 from napi-rs/fix-clippy
Browse files Browse the repository at this point in the history
fix(napi): clippy error on 1.58
  • Loading branch information
Brooooooklyn committed Jan 14, 2022
2 parents 6b01785 + 41bcd9c commit cbbccf2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/napi/src/async_work.rs
Expand Up @@ -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> {}
Expand Down
1 change: 1 addition & 0 deletions crates/napi/src/js_values/value_ref.rs
Expand Up @@ -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> {}

Expand Down
1 change: 1 addition & 0 deletions crates/napi/src/promise.rs
Expand Up @@ -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>
{
Expand Down

0 comments on commit cbbccf2

Please sign in to comment.