File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/serializers/type_serializers Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -221,11 +221,11 @@ impl BuildSerializer for TaggedUnionSerializer {
221
221
let py = schema. py ( ) ;
222
222
let discriminator = Discriminator :: new ( py, & schema. get_as_req ( intern ! ( py, "discriminator" ) ) ?) ?;
223
223
224
- let choice_list : Bound < PyDict > = schema. get_as_req ( intern ! ( py, "choices" ) ) ?;
225
- let mut lookup: HashMap < String , CombinedSerializer > = HashMap :: with_capacity ( choice_list . len ( ) ) ;
226
- let mut choices: Vec < CombinedSerializer > = Vec :: with_capacity ( choice_list . len ( ) ) ;
224
+ let choices_map : Bound < PyDict > = schema. get_as_req ( intern ! ( py, "choices" ) ) ?;
225
+ let mut lookup: HashMap < String , CombinedSerializer > = HashMap :: with_capacity ( choices_map . len ( ) ) ;
226
+ let mut choices: Vec < CombinedSerializer > = Vec :: with_capacity ( choices_map . len ( ) ) ;
227
227
228
- for ( choice_key, choice_schema) in choice_list {
228
+ for ( choice_key, choice_schema) in choices_map {
229
229
let serializer = CombinedSerializer :: build ( choice_schema. downcast ( ) ?, config, definitions) . unwrap ( ) ;
230
230
choices. push ( serializer. clone ( ) ) ;
231
231
lookup. insert ( choice_key. to_string ( ) , serializer) ;
You can’t perform that action at this time.
0 commit comments