mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-12 07:22:59 +00:00
macro: refactoring
purely non-functional changes Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
4d93fa0666
commit
9a290275c3
@ -246,6 +246,17 @@ fn handle_regular_struct(attribs: JSONObject, stru: syn::ItemStruct) -> Result<T
|
||||
if all_of_schemas.is_empty() {
|
||||
finish_schema(schema, &stru, &stru.ident)
|
||||
} else {
|
||||
finish_all_of_struct(stru, schema, all_of_schemas)
|
||||
}
|
||||
}
|
||||
|
||||
/// If we have flattened fields the struct schema is not the "final" schema, but part of an AllOf
|
||||
/// schema containing it and all the flattened field schemas.
|
||||
fn finish_all_of_struct(
|
||||
stru: syn::ItemStruct,
|
||||
mut schema: Schema,
|
||||
all_of_schemas: TokenStream,
|
||||
) -> Result<TokenStream, Error> {
|
||||
let name = &stru.ident;
|
||||
|
||||
// take out the inner object schema's description
|
||||
@ -303,7 +314,6 @@ fn handle_regular_struct(attribs: JSONObject, stru: syn::ItemStruct) -> Result<T
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
/// Field handling:
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user