On 2/19/25 15:25, Stefan Hanreich wrote:
>> Why not use `#[serde(default)]` and always get a boolean? The only place
>> it is used uses .unwrap_or(false) (unwrap_or_default would be preferable
>> imho).
>
> The reasoning for this is that it is modeled 1:1 after what's in the
> property string. It works when reading, but when trying to serialize the
> struct you then always have to provide the value for firewall and cannot
> omit it.
Nvm, it should actually work - for some reason I thought it was
Some(false) and not None then.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel