1
0
Fork 0
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:
Dominic 2019-10-03 00:41:29 +02:00
parent 74ea1b820b
commit 46372dee60
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
3 changed files with 14 additions and 5 deletions

View file

@ -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(