forked from Proxmox/proxmox
fca5218749
'unwrap_' because they will panic and as `const fn` since panic in const fn is now possible Note that const evaluation will only be triggered when actually used in const context, so to ensure *compile time* checks, use something like this: const FOO_SCHEMA: &AllOfSchema = SomeType::API_SCHEMA.unwrap_all_of_schema(); then_use(FOO_SCHEMA); or to use the list of enum values of an enum string type with compile time checks: const LIST: &'static [EnumEntry] = AnEnumStringType::API_SCHEMA .unwrap_string_schema() .unwrap_format() .unwrap_enum_format(); for values in LIST { ... } Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> |
||
---|---|---|
.. | ||
debian | ||
src | ||
tests | ||
Cargo.toml |