serde icon indicating copy to clipboard operation
serde copied to clipboard

Add more tests for flatten enums to increase test coverage

Open Mingun opened this issue 7 months ago • 0 comments

This PR adds more tests for enum flatten into the struct (each in their own commit):

  • Ensure, that serialization produces output that can be deserialized
  • Ensure, that any order of fields in the serialized form for
    struct Flatten {
      #[serde(flatten)]
      data: Enum,
      other_fields: ...,
    }
    
    can be deserialized
  • Ensure, that Enum::Unit can be deserialized when Enum is flatten like above

Mingun avatar May 24 '25 08:05 Mingun