fix(napi-derive): ignore warnings on generated fn
Close https://github.com/napi-rs/napi-rs/issues/968
This commit is contained in:
parent
76798a4343
commit
f76a12eb5a
2 changed files with 4 additions and 0 deletions
|
@ -130,6 +130,8 @@ impl NapiEnum {
|
|||
let js_mod_ident = js_mod_to_token_stream(self.js_mod.as_ref());
|
||||
|
||||
quote! {
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(clippy::all)]
|
||||
unsafe fn #callback_name(env: napi::bindgen_prelude::sys::napi_env) -> napi::bindgen_prelude::Result<napi::bindgen_prelude::sys::napi_value> {
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
|
|
|
@ -306,6 +306,8 @@ impl NapiFn {
|
|||
Span::call_site(),
|
||||
);
|
||||
quote! {
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(clippy::all)]
|
||||
unsafe fn #cb_name(env: napi::bindgen_prelude::sys::napi_env) -> napi::bindgen_prelude::Result<napi::bindgen_prelude::sys::napi_value> {
|
||||
let mut fn_ptr = std::ptr::null_mut();
|
||||
|
||||
|
|
Loading…
Reference in a new issue