schema: make Schema::any_object a const fn

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-08-28 14:32:39 +02:00
parent d166dcff0a
commit e750bce69b

View File

@ -1342,7 +1342,7 @@ impl Schema {
}
}
pub fn any_object(&self) -> Option<&dyn ObjectSchemaType> {
pub const fn any_object(&self) -> Option<&dyn ObjectSchemaType> {
match self {
Schema::Object(s) => Some(s),
Schema::AllOf(s) => Some(s),