ralexstokes / ssz-rs

Implementation of ethereum's `ssz`
Apache License 2.0
103 stars 41 forks source link

Simplify `serde` impl #111

Closed ralexstokes closed 1 year ago

ralexstokes commented 1 year ago

Fixes #110

This change should fix the bug surfaced in #110. It also simplifies the serde implementation across the crate by using the serde derive macros where possible

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (c00a465) 74.39% compared to head (04a1564) 75.73%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #111 +/- ## ========================================== + Coverage 74.39% 75.73% +1.34% ========================================== Files 17 17 Lines 863 849 -14 ========================================== + Hits 642 643 +1 + Misses 221 206 -15 ``` | [Files](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes) | Coverage Δ | | |---|---|---| | [ssz-rs/src/list.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9saXN0LnJz) | `75.64% <ø> (+3.35%)` | :arrow_up: | | [ssz-rs/src/uint.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy91aW50LnJz) | `90.00% <ø> (-0.91%)` | :arrow_down: | | [ssz-rs/src/serde.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9zZXJkZS5ycw==) | `69.56% <88.88%> (+4.56%)` | :arrow_up: | | [ssz-rs/src/vector.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy92ZWN0b3IucnM=) | `79.48% <0.00%> (+1.17%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/111/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes)

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