style(napi-derive): clippy fix (#1976)
This commit is contained in:
parent
71bbe0ef6f
commit
5af366b042
1 changed files with 9 additions and 7 deletions
|
@ -147,13 +147,15 @@ impl NapiFn {
|
|||
..
|
||||
}) = arguments
|
||||
{
|
||||
if let Some(syn::GenericArgument::Type(ty)) = angle_bracketed_args.first() {
|
||||
if let syn::Type::Path(syn::TypePath { path, .. }) = ty {
|
||||
if let Some(segment) = path.segments.first() {
|
||||
if segment.ident.to_string() == parent.to_string() {
|
||||
// If we have a Reference<A> in an impl A block, it shouldn't be an arg
|
||||
return None;
|
||||
}
|
||||
if let Some(syn::GenericArgument::Type(syn::Type::Path(syn::TypePath {
|
||||
path,
|
||||
..
|
||||
}))) = angle_bracketed_args.first()
|
||||
{
|
||||
if let Some(segment) = path.segments.first() {
|
||||
if *parent == segment.ident {
|
||||
// If we have a Reference<A> in an impl A block, it shouldn't be an arg
|
||||
return None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue