Interface: fix deserialize (add default)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer 2023-10-11 11:38:01 +02:00
parent 9c73fcf3cf
commit 8192c9ea56

View File

@ -268,9 +268,9 @@ pub struct Interface {
/// IPv6 gateway
pub gateway6: Option<String>,
#[serde(skip_serializing_if = "Vec::is_empty")]
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub options: Vec<String>,
#[serde(skip_serializing_if = "Vec::is_empty")]
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub options6: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]