feat(derive): Introduce flatten attribute#118
Conversation
87f0b7e to
e42a284
Compare
If I am not mistaken, |
mxinden
left a comment
There was a problem hiding this comment.
Great work. Thanks @howardjohn. I have a couple of questions and comments. Overall this looks good to me.
We can release this as a patch release. Would you mind bumping the patch version in derive-encode/Cargo.toml and provide a changelog entry in CHANGELOG.md?
5d1023c to
9860e05
Compare
Signed-off-by: John Howard <howardjohn@google.com>
Signed-off-by: John Howard <howardjohn@google.com>
Signed-off-by: John Howard <howardjohn@google.com>
3d13bcd to
563459a
Compare
mxinden
left a comment
There was a problem hiding this comment.
Wonderful. Thanks for the follow-up. One more thing for the changelog. Otherwise this is ready to go. Happy to cut a release right once this is merged.
|
For legal reasons you need to add a |
Signed-off-by: John Howard <howardjohn@google.com>
df54834 to
f49e40a
Compare
|
No problem, updated |
Signed-off-by: Max Inden <mail@max-inden.de>
Signed-off-by: Max Inden <mail@max-inden.de>
mxinden
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Thanks for bearing with me.
Fixes #117
This introduces a new attribute to the derive code for to flatten. This matches https://serde.rs/attr-flatten.html.
This seems to work, but I have some concern that if there are duplicate fields we end up encoding all of them which may make things go awry. Checking this is hard since we would need to lookup the type, which I am not sure how to do...