Merge pull request #969 from napi-rs/ignore-warning
fix(napi-derive): ignore warnings on generated fn
This commit is contained in:
commit
cf69651701
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