forked from Proxmox/proxmox
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 {
|
||||
unreachable!();
|
||||
panic!("handle_regular struct without named fields");
|
||||
};
|
||||
|
||||
// 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 {
|
||||
obj.extend_properties(new_fields);
|
||||
} else {
|
||||
unreachable!();
|
||||
panic!("handle_regular_struct with non-object schema");
|
||||
}
|
||||
|
||||
finish_schema(schema, &stru, &stru.ident)
|
||||
|
Loading…
x
Reference in New Issue
Block a user