style: clippy fix

This commit is contained in:
LongYinan 2022-08-17 17:53:44 +08:00
parent 0ef482c6ca
commit 528b1d21cb
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
3 changed files with 4 additions and 3 deletions

View file

@ -54,7 +54,7 @@ pub enum NapiFnArgKind {
Callback(Box<CallbackArg>), Callback(Box<CallbackArg>),
} }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum FnKind { pub enum FnKind {
Normal, Normal,
Constructor, Constructor,
@ -84,7 +84,7 @@ pub struct NapiStruct {
pub use_custom_finalize: bool, pub use_custom_finalize: bool,
} }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum NapiStructKind { pub enum NapiStructKind {
None, None,
Constructor, Constructor,

View file

@ -153,7 +153,7 @@ impl NapiFn {
} }
if ident == "This" { if ident == "This" {
if let Some(syn::GenericArgument::Type(ty)) = angle_bracketed_args.first() { if let Some(syn::GenericArgument::Type(ty)) = angle_bracketed_args.first() {
let (ts_type, _) = ty_to_ts_type(&ty, false, false); let (ts_type, _) = ty_to_ts_type(ty, false, false);
return Some(FnArg { return Some(FnArg {
arg: "this".to_owned(), arg: "this".to_owned(),
ts_type, ts_type,

View file

@ -1,5 +1,6 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unreachable_code)] #![allow(unreachable_code)]
#![allow(clippy::blacklisted_name)]
#[macro_use] #[macro_use]
extern crate napi_derive; extern crate napi_derive;