serde
serde copied to clipboard
Remove code duplication when deriving Deserialize for adjacently tagged enums
Adjacently tagged enums with many struct variants should get most benefit from that.
@dtolnay, @oli-obk, could you look at this simple optimization?
@dtolnay, @oli-obk mind to merge this very simple optimization (the second commit does the job). Expanding of variant_arms variable performed twice which creates duplication. The effect especially visible when struct variants are used, because they generate a lot of code.