From 4128c5fdb54bd91fa36c67ff13db6387524cbaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 28 Oct 2021 15:00:47 +0200 Subject: [PATCH] updater: impl UpdaterType for Vec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by replacing the whole Vec. if we ever want to support adding/removing/modifying elements of a Vec via the Updater, we'd need to extend it anyway (or use a custom updater). Suggested-by: Dominik Csapak Signed-off-by: Fabian Grünbichler --- proxmox-schema/src/schema.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs index 34135f45..5e6e8185 100644 --- a/proxmox-schema/src/schema.rs +++ b/proxmox-schema/src/schema.rs @@ -1179,6 +1179,11 @@ where type Updater = T::Updater; } +// this will replace the whole Vec +impl UpdaterType for Vec { + type Updater = Option; +} + pub trait ApiType { const API_SCHEMA: Schema; }