p2p, swarm, trie: avoid copying slices in loops (#17265)
This commit is contained in:
committed by
Péter Szilágyi
parent
de9b0660ac
commit
cf05ef9106
@ -356,7 +356,7 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
|
||||
// value that is left in n or -2 if n contains at least two
|
||||
// values.
|
||||
pos := -1
|
||||
for i, cld := range n.Children {
|
||||
for i, cld := range &n.Children {
|
||||
if cld != nil {
|
||||
if pos == -1 {
|
||||
pos = i
|
||||
|
Reference in New Issue
Block a user