Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 128-bit integers in flatten structs and internally tagged enums #2781

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Jul 28, 2024

This PR depends on serde-rs/test#6 and currently temporary uses my fork with branch that adds necessary support for testing 128-bit integers. It is possible, however, drop the first two commits, but that will mean that 128-bit integers will not be tested. I'd prefer to merge serde-rs/test#6 and then update this PR to use new version of serde_test.

Closes #1682, closes #2230, closes #2576

@WiSaGaN
Copy link
Contributor

WiSaGaN commented Aug 11, 2024

This looks like a pretty clean fix. @dtolnay would you take a look please?

(review this commit with "ignore whitespace changes" option on)
failures (5):
    newtype::enum_::newtype   (deserialize)
    newtype::enum_::struct_   (serialize)
    newtype::enum_::tuple     (serialize)
    newtype::struct_          (deserialize)
    struct_                   (deserialize)
…of internally tagged enums

Deserialization not checked because there is no sequence of tokens
that could represent test values

failures (7):
    newtype::enum_::newtype   (deserialize)
    newtype::enum_::struct    (serialize)
    newtype::enum_::tuple     (serialize)
    newtype::i128             (serialize)
    newtype::struct_          (deserialize)
    newtype::u128             (serialize)
    struct_                   (deserialize)
failures (8):
    newtype::enum_::newtype   (deserialize)
    newtype::enum_::struct_   (serialize)
    newtype::enum_::tuple     (serialize)
    newtype::i128             (serialize)
    newtype::newtype_struct   (deserialize)
    newtype::struct_          (deserialize)
    newtype::u128             (serialize)
    struct_                   (deserialize)
`Content` size doesn't changed, because it is already big enough
(64 bytes due to `TupleVariant` and `StructVariant`).

Fixes (2):
    newtype::i128             (serialize)
    newtype::u128             (serialize)

failures (6):
    newtype::enum_::newtype   (deserialize)
    newtype::enum_:;struct    (deserialize)
    newtype::enum_::tuple     (deserialize)
    newtype::newtype_struct   (deserialize)
    newtype::struct_          (deserialize)
    struct_                   (deserialize)
…y tagged enums

Fixed (6):
    newtype::enum_::newtype
    newtype::enum_::struct_
    newtype::enum_::tuple
    newtype::newtype_struct
    newtype::struct_
    struct_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants