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

Explicit string (de)serialize for optional serde-with-str values #565

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

paupino
Copy link
Owner

@paupino paupino commented Jan 13, 2023

Fixes #563

This should resolve optional values not serializing/deserializing properly with bincode. This is a two part fix:

  1. We explicitly serialize_some now to ensure that the Some enum is encoded properly
  2. We use an explicit Deserialize visitor that will always use string deserialization rather than rely on a hint

@paupino paupino enabled auto-merge (squash) January 13, 2023 00:47
@paupino paupino merged commit 2da7a0d into master Jan 13, 2023
@paupino paupino deleted the f/fixes-serialize-opt-str branch January 13, 2023 00:59
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.

serde-with-str - str_option does not work with bincode, unlike serde-str #483
1 participant