bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.63k stars 265 forks source link

Implement Encode & Decode for Wrapping<T> types #686

Closed mzachar closed 8 months ago

mzachar commented 8 months ago

Structures can clearly indicate that the value may overflow and it is intended behaviour

VictorKoenders commented 8 months ago

I double checked serde's implementation (which matches your implementation, so you're good) and I noticed they also implement std::cmp::Reverse<T>. This is also a simple wrapper around T. Would you mind adding that as well?

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (3a638a7) 57.24% compared to head (8792100) 57.39%.

:exclamation: Current head 8792100 differs from pull request most recent head 3847e54. Consider uploading reports for the commit 3847e54 to get more accurate results

Files Patch % Lines
src/de/impls.rs 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #686 +/- ## ========================================== + Coverage 57.24% 57.39% +0.15% ========================================== Files 51 51 Lines 4350 4366 +16 ========================================== + Hits 2490 2506 +16 Misses 1860 1860 ```

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

mzachar commented 8 months ago

I don't mind at all :)