mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
style(napi-derive): clippy fix (#1976)
This commit is contained in:
parent
71bbe0ef6f
commit
5af366b042
@ -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…
x
Reference in New Issue
Block a user