Skip to content

Commit

Permalink
Remove workaround for not having a map
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek committed Jul 21, 2021
1 parent a1d69cb commit 307399e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 307399e

Please sign in to comment.