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

feat(codegen): Infer Default and Deserialize bounds correctly #285

Merged
merged 1 commit into from
Apr 19, 2016
Merged

feat(codegen): Infer Default and Deserialize bounds correctly #285

merged 1 commit into from
Apr 19, 2016

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Apr 13, 2016

This PR addresses the remaining part of #197 (following up on my previous PRs #260 and #265) by inferring a T: Default bound for fields that (1) have #[serde(default)], or (2) have #[serde(skip_deserializing)] and not #[serde(default=...)]. I factored out the generics-building code from #260 to share it between ser and de.

This PR also makes progress toward #259, although I have not attempted to resolve the MapVisitor::missing_field problem mentioned in that issue.

@erickt
Copy link
Member

erickt commented Apr 19, 2016

awesome!

@dtolnay dtolnay deleted the bounds branch April 19, 2016 17:25
@dtolnay dtolnay mentioned this pull request May 14, 2016
@dtolnay dtolnay added this to the v0.7.4 milestone Jun 9, 2016
rubdos pushed a commit to rubdos/serde that referenced this pull request Jun 20, 2017
rational: Implement approximation from floats and FromPrimitive for v…

…arious types

FromPrimitive is implemented for i8/16/32/64 and BigInt.

rust-num/num#282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants