mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-02 10:07:43 +00:00
api-macro: replace unreachable with a panic
(we're not running into this, but ran into an unreachable in `syn` during development, and I needed to make sure it's not one of ours...) Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
dc4ec65723
commit
f4e88aab6c
@ -171,7 +171,7 @@ fn handle_regular_struct(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unreachable!();
|
panic!("handle_regular struct without named fields");
|
||||||
};
|
};
|
||||||
|
|
||||||
// now error out about all the fields not found in the struct:
|
// now error out about all the fields not found in the struct:
|
||||||
@ -195,7 +195,7 @@ fn handle_regular_struct(
|
|||||||
if let api::SchemaItem::Object(ref mut obj) = &mut schema.item {
|
if let api::SchemaItem::Object(ref mut obj) = &mut schema.item {
|
||||||
obj.extend_properties(new_fields);
|
obj.extend_properties(new_fields);
|
||||||
} else {
|
} else {
|
||||||
unreachable!();
|
panic!("handle_regular_struct with non-object schema");
|
||||||
}
|
}
|
||||||
|
|
||||||
finish_schema(schema, &stru, &stru.ident)
|
finish_schema(schema, &stru, &stru.ident)
|
||||||
|
Loading…
Reference in New Issue
Block a user