[pve-devel] [PATCH proxmox-ve-rs 1/1] partially fix #6176: config: guest: change default for firewall key
Stefan Hanreich
s.hanreich at proxmox.com
Wed Feb 19 17:12:59 CET 2025
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.
More information about the pve-devel
mailing list