-
Notifications
You must be signed in to change notification settings - Fork 97
Support seq and maps (rebase of #142, refactor of #129) #154
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
Conversation
Closes #135. |
FYI, I've contributed to and find this project useful and so proposed we move it to a group: #155. |
} | ||
|
||
#[test] | ||
fn test_serialize_map_within_struct() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test actually fails intermittently.
I'm wondering if it is from the implementation of serializing Map's or the test relying on a fixed order of printed keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, this test is relying on the Map's items being ordered, which is totally wrong. Sorry for that.
I'd suggest removing the second insert or relaxing the assert using .contains()
to assert that at least the content is ok, rather than the exact output content+order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hints, I pushed an update to fix the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, this test is relying on the Map's items being ordered, which is totally wrong. Sorry for that.
ah, makes sense @adrianbenavides. Thank you for explaining! No need to apologize too. Part of learning!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stellar, thanks @joemat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, cannot find the resolve button. I ran cargo test ser
repeatedly locally and things look great!
Hi, I noticed this awesome job. Would you complete this Pull Request? Or if possible I can also take over and resolve the conflicting part. |
FTR you did the rebase here #170, thanks. |
yes, makes sense to close this one then |
Based on #142 and #129 this PR adds support to serialize maps and vectors.
See description of #142 for details.
This is just a rebased version of #142 which fixes the merge conflict.
Kudos to @adrianbenavides and @Niedzwiedzw for their work on this.