Skip to content

Commit

Permalink
clean up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
guregu committed May 5, 2024
1 parent 887fb08 commit 54e2f54
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ func (info *structInfo) findEncoder(key encodeKey) encodeFunc {
if enc, ok := info.types[key]; ok {
return enc
}
if enc := info.parent.findEncoder(key); enc != nil {
return enc
}
return info.parent.findEncoder(key)
}

Expand Down Expand Up @@ -329,16 +326,6 @@ func collectTypes(rt reflect.Type, info *structInfo, trail []int) *structInfo {
panic("not a struct")
}

if info == nil {
info = &structInfo{
root: rt,
fields: make(map[string]*structField),
refs: make(map[encodeKey][]*structField),
types: make(map[encodeKey]encodeFunc),
seen: make(map[encodeKey]struct{}),
}
}

// fields := make(map[string]reflect.Value)
for i := 0; i < rt.NumField(); i++ {
field := rt.Field(i)
Expand Down

0 comments on commit 54e2f54

Please sign in to comment.