Skip to content

Commit

Permalink
fix: deepcopy-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Lack30 committed Jun 19, 2023
1 parent d75d9cb commit 81e1434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepcopy-gen/deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ func (g *genDeepCopy) doSlice(t *types.Type, sw *generator.SnippetWriter) {
sw.Do("for i := range *in {\n", nil)
if uet.Kind == types.Slice || uet.Kind == types.Map || uet.Kind == types.Pointer || deepCopyMethodOrDie(ut.Elem) != nil || deepCopyIntoMethodOrDie(ut.Elem) != nil {
sw.Do("if (*in)[i] != nil {\n", nil)
sw.Do("in, out := &(*out)[i], &(*out)[i]\n", nil)
sw.Do("in, out := &(*in)[i], &(*out)[i]\n", nil)
g.generateFor(ut.Elem, sw)
sw.Do("}\n", nil)
} else if uet.Kind == types.Interface {
Expand Down

0 comments on commit 81e1434

Please sign in to comment.