paritytech / parity-scale-codec

Lightweight, efficient, binary serialization and deserialization codec
Apache License 2.0
257 stars 94 forks source link

Fix `MaxEncodedLen` derive macro for enum with skipped variant #622

Closed gui1117 closed 3 months ago

gui1117 commented 3 months ago

right now MaxEncodedLen do not differentiate betwen skipped variants and normal variants on enum.

Now skipped variant are correctly skipped.

(also thinking again, it is not so much consistent to have skipped variant being not decodable and skipped fields being decoded to default value. Maybe it should be 2 different names)

gui1117 commented 3 months ago

CI fails because I am external maybe? or CI is down?

ggwpez commented 3 months ago

@gui1117 i started the CI now. Looks like the format is not happy and the clippy because of unconstructed variants 🙃

gui1117 commented 3 months ago

@gui1117 i started the CI now. Looks like the format is not happy and the clippy because of unconstructed variants 🙃

Thanks, it should be fixed hopefully