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

Flattening a unit struct should work like flattening unit itself #2801

Closed
jonhoo opened this issue Aug 15, 2024 · 1 comment · Fixed by #2802
Closed

Flattening a unit struct should work like flattening unit itself #2801

jonhoo opened this issue Aug 15, 2024 · 1 comment · Fixed by #2802

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Aug 15, 2024

#1874 landed support for flattening the unit type after a report in #1873. However, it did not override deserialize_unit_struct and serialize_unit_struct, so while flattening () now works, flattening struct Unit; does not. It's not clear whether this was intentional or not, though it seems reasonable to support unit structs the same as unit here.

@jonhoo
Copy link
Contributor Author

jonhoo commented Aug 15, 2024

If uncontroversial, I've put up a simple implementation following the footsteps of #1874 in #2802.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant