-
Notifications
You must be signed in to change notification settings - Fork 542
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
Add Serialize/Deserialize for Option<DateTime> #302
Conversation
One test for Rust 1.13.0 fails on error: unions are unstable and possibly buggy (see issue #32836)
--> /Users/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.48/src/macros.rs:42:13
|
42 | pub $t $i { $($field)* }
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
::: /Users/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.48/src/lib.rs
|
177 | cfg_if! {
| - in this macro invocation
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile `libc`. I'm not sure where it comes from. It seems unrelated to this PR. |
yeah that error is coming from libc, the most recent version doesn't support rust 1.13. I'm not sure what the best way to handle that is, but it's not something you have to worry about. |
@quodlibetor Is there anything that need to be done to have this one merged? |
+1 can we merge this? |
Sorry about the delay, I feel like there ought to be a better way to do this, since currently using an option can be done pretty trivially #125 (comment) . So, (A) I would rather this was already more ergonomic, and (B) maybe it would be better to do something that doesn't add quite as much API surface/code that requires maintenance. |
@quodlibetor maybe I missed something but the code in #125 (comment) doesn't work for me. It throws with IMHO because the proposed code in your comment does not actually handle the case when the field is not here. Which is the whole point behind So AFAIK this PR is still required and very useful. |
My bad: the suggested solution in #125 (comment) works if I add |
Looks good enough to merge, we can make the code-size smaller in a future commit. |
This PR for the issue.