From bb62206e270b219a170eebe48c8c5945b1292f50 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 19 Jul 2019 15:24:39 +0200 Subject: [PATCH] macro: disable derive_default for now Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/src/api_macro.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proxmox-api-macro/src/api_macro.rs b/proxmox-api-macro/src/api_macro.rs index 08a2788e..36cea1e4 100644 --- a/proxmox-api-macro/src/api_macro.rs +++ b/proxmox-api-macro/src/api_macro.rs @@ -494,6 +494,13 @@ fn handle_struct_named( .transpose()? .unwrap_or(false); + if derive_default { + // We currently fill the actual `default` values from the schema into Option, but + // really Option should default to None even when there's a Default as our accessors + // will fill in the default at use-time... + panic!("derive_default is not finished"); + } + let field_count = item.named.len(); let type_s = type_ident.to_string();