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

Flatten #270

Merged
merged 6 commits into from
Feb 22, 2024
Merged

Flatten #270

merged 6 commits into from
Feb 22, 2024

Conversation

TedDriggs
Copy link
Owner

Add support for #[darling(flatten)]; this does the same thing that #[serde(flatten)] does, removing a layer of structure in the AST representation to allow for "merging" two structs together.

Fixes #146

This addressed some issues of warnings for unread assignments.
flatten doesn't work with many of the other field-level options, so emit errors when they are used together.
This will allow cheap comparison against other alternates.

This required dropping the test-only Eq impl, as f64 does not impl Eq.
For flattened members, this makes the "did you mean" suggestions accurate and more useful
@TedDriggs TedDriggs merged commit 78ad512 into master Feb 22, 2024
24 checks passed
@TedDriggs TedDriggs deleted the flatten branch February 22, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for flatten
1 participant