ralexstokes / ssz-rs

Implementation of ethereum's `ssz`
Apache License 2.0
102 stars 40 forks source link

Replace index with get #60

Closed doubledup closed 1 year ago

doubledup commented 1 year ago

This helps address #22, though I've done my best to avoid overlapping with #54 (I've left the case that's handled there in ssz-rs-derive).

ralexstokes commented 1 year ago

cargo is being opinionated about the whitespace formatting of the comments... ill go fix the lint

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 22.01% and project coverage change: -15.63 :warning:

Comparison is base (9cc2fb1) 59.91% compared to head (8361677) 44.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #60 +/- ## =========================================== - Coverage 59.91% 44.28% -15.63% =========================================== Files 20 20 Lines 953 1409 +456 =========================================== + Hits 571 624 +53 - Misses 382 785 +403 ``` | [Impacted Files](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes) | Coverage Δ | | |---|---|---| | [ssz-rs-derive/src/lib.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzLWRlcml2ZS9zcmMvbGliLnJz) | `0.00% <0.00%> (ø)` | | | [ssz-rs-test-gen/src/main.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzLXRlc3QtZ2VuL3NyYy9tYWluLnJz) | `0.00% <0.00%> (ø)` | | | [ssz-rs/src/boolean.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9ib29sZWFuLnJz) | `91.30% <ø> (+1.30%)` | :arrow_up: | | [ssz-rs/src/lib.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?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% <ø> (+50.00%)` | :arrow_up: | | [ssz-rs/src/merkleization/node.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9tZXJrbGVpemF0aW9uL25vZGUucnM=) | `60.00% <ø> (ø)` | | | [ssz-rs/src/serde.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9zZXJkZS5ycw==) | `100.00% <ø> (+7.14%)` | :arrow_up: | | [ssz-rs/src/de.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9kZS5ycw==) | `72.88% <61.11%> (+2.04%)` | :arrow_up: | | [ssz-rs/src/bitvector.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9iaXR2ZWN0b3IucnM=) | `82.95% <80.00%> (+7.95%)` | :arrow_up: | | [ssz-rs/src/bitlist.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9iaXRsaXN0LnJz) | `78.94% <90.90%> (+7.35%)` | :arrow_up: | | [ssz-rs/src/list.rs](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes#diff-c3N6LXJzL3NyYy9saXN0LnJz) | `75.00% <100.00%> (+16.23%)` | :arrow_up: | | ... and [6 more](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex+Stokes) | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/ralexstokes/ssz-rs/pull/60/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: Do you have feedback about the report comment? Let us know in this issue.