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,6 +113,7 @@ 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
|
||||
|
@ -124,7 +125,6 @@ pub fn generate(object_args: &args::Object, input: &mut DeriveInput) -> Result<T
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let cache_control = {
|
||||
let public = object_args.cache_control.public;
|
||||
|
|
|
@ -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