glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
12.38k stars 1.08k forks source link

Rust: Too many boxes #1112

Open waywardmonkeys opened 5 years ago

waywardmonkeys commented 5 years ago

The Rust backend generates too many boxes.

It generates things like Box<Option<Box<ChiangMaiGoose>>> where it should only be Option<ChiangMaiGoose.

An Option needn't be boxed. And I don't think that an enum needs to be boxed either. (ChiangMaiGoose is an enum in this case.)

inferrinizzard commented 5 months ago

Could you help to provide an example of an input file that causes this situation ?