Support `@sparse` constrained map shapes and list shapes (#2213)
Turns out we've never supported them, neither directly constrained nor with constrained members, because of a lack of tests. Yet another data point to prioritize working on code-generating `constraints.smithy` (see https://github.com/awslabs/smithy-rs/issues/2101). The implementation is simple: we just need to call the symbol provider on the member symbols instead of on the target symbols so we get `Option<T>` list members / map values if applicable, and handle the wrapper when converting between unconstrained and constrained types with help from `match` and `Option<T>::map`.
Loading
Please register or sign in to comment