paritytech / parity-scale-codec

Lightweight, efficient, binary serialization and deserialization codec
Apache License 2.0
246 stars 95 forks source link

Add dedup_len trait #532

Closed 0xmovses closed 11 months ago

0xmovses commented 11 months ago

This is a fix for https://github.com/paritytech/polkadot-sdk/issues/126

bkchr commented 11 months ago

Please revert the FMT commit.

ggwpez commented 11 months ago

Wait... this adds a DecodeDedupLength trait for BTreeSet? I dont think thats possible. The advantage of the DecodeLen is that is does not have to decode everything, but only a Compact<u32>.
What i meant in the other issue to just remove the impl DecodeLen for BTreeSet and replace it with a DecodeNonDedupLen or so.
cc @bkchr

0xmovses commented 11 months ago

Yeah that's clearer now, let me update this.

0xmovses commented 11 months ago

I don't think we need to add this here anymore, as we are just adding a more descriptive trait in polkadot-sdk, closing this.