Fix some bugs
This commit is contained in:
parent
d1da95d618
commit
f6e95876b8
|
@ -363,6 +363,15 @@ pub fn generate(object_args: &args::Object, item_impl: &mut ItemImpl) -> Result<
|
|||
}
|
||||
});
|
||||
|
||||
if let Some((idx, _)) = method
|
||||
.attrs
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, a)| a.path.is_ident("field"))
|
||||
{
|
||||
method.attrs.remove(idx);
|
||||
}
|
||||
} else {
|
||||
if let Some((idx, _)) = method
|
||||
.attrs
|
||||
.iter()
|
||||
|
|
|
@ -113,15 +113,15 @@ pub fn generate(object_args: &args::Object, input: &mut DeriveInput) -> Result<T
|
|||
return #crate_name::OutputValueType::resolve(&self.#ident, &ctx_obj, ctx.position).await;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if let Some((idx, _)) = item
|
||||
.attrs
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, a)| a.path.is_ident("field"))
|
||||
{
|
||||
item.attrs.remove(idx);
|
||||
}
|
||||
if let Some((idx, _)) = item
|
||||
.attrs
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, a)| a.path.is_ident("field"))
|
||||
{
|
||||
item.attrs.remove(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,8 +254,15 @@ pub fn generate(object_args: &args::Object, item_impl: &mut ItemImpl) -> Result<
|
|||
return Ok(Box::pin(stream));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
method.attrs.clear();
|
||||
if let Some((idx, _)) = method
|
||||
.attrs
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, a)| a.path.is_ident("field"))
|
||||
{
|
||||
method.attrs.remove(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user