Skip to content

Commit b9b8496

Browse files
authored
Do not embed reflect.Type to avoid supressing DCE (#73)
1 parent 5b43291 commit b9b8496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (fs fields) Less(i, j int) bool {
4242

4343
type typeKey struct {
4444
tag string
45-
reflect.Type
45+
typ reflect.Type
4646
}
4747

4848
type fieldMap map[string]fields
@@ -92,7 +92,7 @@ func buildFields(k typeKey) fields {
9292
tag
9393
}
9494

95-
q := fields{{typ: k.Type}}
95+
q := fields{{typ: k.typ}}
9696
visited := make(map[key]struct{})
9797
fm := make(fieldMap)
9898

0 commit comments

Comments
 (0)