chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Serde rfc 2822

Open chrisranderson opened this issue 1 year ago • 3 comments
trafficstars

Thanks for contributing to chrono!

If your feature is semver-compatible, please target the main branch; for semver-incompatible changes, please target the 0.5.x branch.

I'm not sure what this means - every change is compatible with semver, right? Are you asking if it's a backwards-incompatible change?

Please consider adding a test to ensure your bug fix/feature will not break in the future.

Done.

chrisranderson avatar Feb 04 '24 23:02 chrisranderson

Continuing from @pitdicker https://github.com/chronotope/chrono/issues/1292#issuecomment-1918472102:

I could comment on a few nits, but it looks pretty much like it should. I believe all other deserialize implementations deserialize to DateTime<FixedOffset>? We should do so here to. DateTime<Utc> discards the serialized offset info. And all other (de)serializers support an Option variant.

I changed it to deserialize to DateTime<FixedOffset>. Not all other (de)serializers support an Option variant, though - the rfc3339 one doesn't, right?

chrisranderson avatar Feb 04 '24 23:02 chrisranderson

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (cf17f7a) 91.72% compared to head (164cb44) 91.85%. Report is 20 commits behind head on main.

Files Patch % Lines
src/datetime/serde.rs 93.02% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1412      +/-   ##
==========================================
+ Coverage   91.72%   91.85%   +0.12%     
==========================================
  Files          38       38              
  Lines       17266    17561     +295     
==========================================
+ Hits        15838    16130     +292     
- Misses       1428     1431       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 04 '24 23:02 codecov[bot]

Forgot to add: thank you for working on this!

And the changes are related enough to be squashed into one commit please.

pitdicker avatar Feb 05 '24 09:02 pitdicker

@chrisranderson are you still interested in completing this PR?

pitdicker avatar Mar 01 '24 13:03 pitdicker

No, sorry. Gratefully, I am now employed. Sorry to leave this hanging loose.

chrisranderson avatar Mar 01 '24 14:03 chrisranderson

Congratulations! And no worries.

pitdicker avatar Mar 01 '24 14:03 pitdicker

Opened #1477.

pitdicker avatar Mar 01 '24 15:03 pitdicker