Skip to content

Conversation

3Hren
Copy link
Owner

@3Hren 3Hren commented Sep 9, 2015

  • Fix enums deserialization.
  • Separate serde tests with macro.
  • Fix deserialization of Option with default initialization (using unit).
  • Add --features=serde_macros to TravisCI.
  • Enum decoding policy (serde).
  • Update changelog.
  • Add git cop checks.

3Hren added 10 commits September 9, 2015 12:40
This commit also forbids the following Option deserialization cases:
 - Option<()>.
 - Option<Option<...>>.

It's impossible to properly deserialize the listed cases without
explicit option marker in protocol.

If required I can consider injecting another policy in Deserializer.

This commit fixes #41.
This change allows to easily override default
enum deserialization behavior.

As an example there is enum deserialization without
wrapping tuple of size 2.
@3Hren 3Hren force-pushed the pr/fix-serde-enums branch from bbb3555 to 46d0093 Compare September 9, 2015 21:52
Previously it was serialized as unit (nil), now there is just empty
array ([]).
 - New error type introduced - UnknownLength. Returned on attempt to
   serialize struct, map or serquence with unknown length (Serde allows
   this).
 - The new type is returned if necessary.
 - Added unit test to check proper empty map serialization.
@3Hren 3Hren force-pushed the pr/fix-serde-enums branch 5 times, most recently from be6e818 to 632705c Compare September 10, 2015 22:30
@3Hren 3Hren force-pushed the pr/fix-serde-enums branch from 632705c to 43f3ac3 Compare September 10, 2015 22:35
@3Hren 3Hren added this to the v0.7.0 milestone Sep 10, 2015
@3Hren 3Hren added the T: bug label Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant