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 20, 2021
1 parent cc3247a commit 6a873c3
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 6a873c3

Please sign in to comment.