reflectx: fixes to items reported by megacheck

This commit is contained in:
Michał Matczuk
2018-05-25 11:00:45 +02:00
parent aef66f4663
commit daad194304
2 changed files with 1 additions and 6 deletions

View File

@@ -269,9 +269,7 @@ type typeQueue struct {
// A copying append that creates a new slice each time.
func apnd(is []int, i int) []int {
x := make([]int, len(is)+1)
for p, n := range is {
x[p] = n
}
copy(x, is)
x[len(x)-1] = i
return x
}