]> git.proxmox.com Git - proxmox.git/commitdiff
schema: make Schema::any_object a const fn
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 28 Aug 2024 12:32:39 +0000 (14:32 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 28 Aug 2024 12:32:39 +0000 (14:32 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-schema/src/schema.rs

index 5cecdd0a3e3436a8266c79ff68b9e6a9f9e2ae4c..5cda29bd5c14048a0bdf71be40a7e2b9de91880e 100644 (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),