ralexstokes / ssz-rs

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

harden typing to increase safety of serialization routine #81

Closed ralexstokes closed 1 year ago

ralexstokes commented 1 year ago

minor but also skips a redundant iteration over the variable lengths summation that can be done inline like the fixed lengths summation

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 94.59% and project coverage change: -0.03 :warning:

Comparison is base (b872969) 75.26% compared to head (a6eb171) 75.23%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #81 +/- ## ========================================== - Coverage 75.26% 75.23% -0.03% ========================================== Files 18 18 Lines 857 856 -1 ========================================== - Hits 645 644 -1 Misses 212 212 ``` | [Impacted Files](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?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/lib.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9saWIucnM=) | `100.00% <ø> (ø)` | | | [ssz-rs/src/ser.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9zZXIucnM=) | `71.05% <92.00%> (-6.04%)` | :arrow_down: | | [ssz-rs/src/array.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9hcnJheS5ycw==) | `25.71% <100.00%> (+3.32%)` | :arrow_up: | | [ssz-rs/src/list.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9saXN0LnJz) | `75.94% <100.00%> (+0.94%)` | :arrow_up: | | [ssz-rs/src/vector.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy92ZWN0b3IucnM=) | `83.90% <100.00%> (+0.57%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.