From 8ce46932d65155d93c5ff55e9ddaea62583da2a1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 25 Feb 2021 09:16:38 +0100 Subject: [PATCH] use Send+Sync on dyn ObjectSchemaType Signed-off-by: Wolfgang Bumiller --- proxmox/src/api/section_config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxmox/src/api/section_config.rs b/proxmox/src/api/section_config.rs index b74b8155..1fd2721f 100644 --- a/proxmox/src/api/section_config.rs +++ b/proxmox/src/api/section_config.rs @@ -34,7 +34,7 @@ use crate::try_block; /// Associates a section type name with a `Schema`. pub struct SectionConfigPlugin { type_name: String, - properties: &'static (dyn ObjectSchemaType + 'static), + properties: &'static (dyn ObjectSchemaType + Send + Sync + 'static), id_property: Option, } @@ -42,7 +42,7 @@ impl SectionConfigPlugin { pub fn new( type_name: String, id_property: Option, - properties: &'static (dyn ObjectSchemaType + 'static), + properties: &'static (dyn ObjectSchemaType + Send + Sync + 'static), ) -> Self { Self { type_name, @@ -59,7 +59,7 @@ impl SectionConfigPlugin { self.id_property.as_deref() } - pub fn properties(&self) -> &(dyn ObjectSchemaType + 'static) { + pub fn properties(&self) -> &(dyn ObjectSchemaType + Send + Sync + 'static) { self.properties } @@ -361,7 +361,7 @@ impl SectionConfig { let mut state = ParseState::BeforeHeader; let test_required_properties = |value: &Value, - schema: &dyn ObjectSchemaType, + schema: &(dyn ObjectSchemaType + Send + Sync), id_property: &Option| -> Result<(), Error> { for (name, optional, _prop_schema) in schema.properties() { -- 2.39.5