diff --git a/hack/generator/pkg/testcases/object_type_serialization_test_case.go b/hack/generator/pkg/testcases/object_type_serialization_test_case.go index 18ddb1af776..30eb792eb07 100644 --- a/hack/generator/pkg/testcases/object_type_serialization_test_case.go +++ b/hack/generator/pkg/testcases/object_type_serialization_test_case.go @@ -59,7 +59,7 @@ func (o ObjectSerializationTestCase) References() astmodel.TypeNameSet { // codeGenerationContext contains reference material to use when generating func (o ObjectSerializationTestCase) AsFuncs(name astmodel.TypeName, genContext *astmodel.CodeGenerationContext) []dst.Decl { var errs []error - properties := o.makePropertyMap() + properties := o.objectType.Properties() // Find all the simple generators (those with no external dependencies) simpleGenerators := o.createGenerators(properties, genContext, o.createIndependentGenerator) @@ -668,14 +668,6 @@ func (o *ObjectSerializationTestCase) removeByPackage( } } -func (o *ObjectSerializationTestCase) makePropertyMap() map[astmodel.PropertyName]*astmodel.PropertyDefinition { - result := make(map[astmodel.PropertyName]*astmodel.PropertyDefinition) - for _, prop := range o.objectType.Properties() { - result[prop.PropertyName()] = prop - } - return result -} - func (o ObjectSerializationTestCase) idOfSubjectGeneratorGlobal() string { return o.idOfGeneratorGlobal(o.subject) }