mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
don't loose dependencies
This commit is contained in:
parent
74ea1b820b
commit
46372dee60
3 changed files with 14 additions and 5 deletions
|
@ -84,6 +84,16 @@ fn expand_field(field : &Field) -> TokenStream2
|
|||
required.push(stringify!(#ident).to_string());
|
||||
}
|
||||
|
||||
let keys : Vec<String> = schema.dependencies.keys().map(|k| k.to_string()).collect();
|
||||
for dep in keys
|
||||
{
|
||||
let dep_schema = schema.dependencies.swap_remove(&dep);
|
||||
if let Some(dep_schema) = dep_schema
|
||||
{
|
||||
dependencies.insert(dep, dep_schema);
|
||||
}
|
||||
}
|
||||
|
||||
match schema.name.clone() {
|
||||
Some(name) => {
|
||||
properties.insert(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue