Skip to content

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented May 24, 2025

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

@oli-obk oli-obk added this pull request to the merge queue Sep 18, 2025
Merged via the queue into serde-rs:master with commit 2316610 Sep 18, 2025
14 checks passed
@Mingun Mingun deleted the flatten-enum-tests branch September 18, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants