mirror of
https://git.proxmox.com/git/proxmox
synced 2025-10-04 11:59:37 +00:00
api-macro: reorganize field iteration
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
9207e8aa9a
commit
46fe5832fb
@ -86,20 +86,18 @@ fn handle_regular_struct(
|
||||
|
||||
let ident_name: String = ident.to_string();
|
||||
|
||||
let field_def: &mut (FieldName, bool, Schema) = match schema_fields.remove(&ident_name)
|
||||
{
|
||||
Some(field) => field,
|
||||
match schema_fields.remove(&ident_name) {
|
||||
Some(field_def) => handle_regular_field(field_def, field)?,
|
||||
None => {
|
||||
new_fields.push((
|
||||
let mut field_def = (
|
||||
FieldName::new(ident_name.clone(), ident.span()),
|
||||
false,
|
||||
Schema::blank(ident.span()),
|
||||
));
|
||||
new_fields.last_mut().unwrap()
|
||||
);
|
||||
handle_regular_field(&mut field_def, field)?;
|
||||
new_fields.push(field_def);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
handle_regular_field(field_def, field)?;
|
||||
}
|
||||
} else {
|
||||
unreachable!();
|
||||
|
Loading…
Reference in New Issue
Block a user