public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer 1/2] auto: answer: drop unneeded #[serde(default)] attributes
@ 2025-04-29 13:20 Christoph Heiss
  2025-04-29 13:20 ` [pve-devel] [PATCH installer 2/2] auto: answer: simplify `BTreeMap` handling in deserialization Christoph Heiss
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2025-04-29 13:20 UTC (permalink / raw)
  To: pve-devel

For `Option<>`s, serde automatically defaults to `None` for
deserialization in case the key is missing in the source.

No functional changes.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 proxmox-auto-installer/src/answer.rs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/proxmox-auto-installer/src/answer.rs b/proxmox-auto-installer/src/answer.rs
index 34065e8..cbf268d 100644
--- a/proxmox-auto-installer/src/answer.rs
+++ b/proxmox-auto-installer/src/answer.rs
@@ -23,9 +23,7 @@ pub struct Answer {
     pub network: Network,
     #[serde(rename = "disk-setup")]
     pub disks: Disks,
-    #[serde(default)]
     pub post_installation_webhook: Option<PostNotificationHookInfo>,
-    #[serde(default)]
     pub first_boot: Option<FirstBootHookInfo>,
 }
 
-- 
2.49.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-29 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 13:20 [pve-devel] [PATCH installer 1/2] auto: answer: drop unneeded #[serde(default)] attributes Christoph Heiss
2025-04-29 13:20 ` [pve-devel] [PATCH installer 2/2] auto: answer: simplify `BTreeMap` handling in deserialization Christoph Heiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal