Skip to content

For optional properties in Field type replace usage of Option with serde(default) #367

@meskill

Description

@meskill

Followed from the discussion

For some fields there are Option wrapper is used to mark that the property might not be defined by the user and therefore should get some default value. But using Option instead of raw type like bool may lead to bugs like mentioned in #342

Suggested solution

Instead of using Option for such cases use #[serde(default)] attribute as described in serde doc

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions