aboutsummaryrefslogtreecommitdiffstats
path: root/trie/trie.go
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2018-08-07 18:56:40 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-08-07 18:56:40 +0800
commitcf05ef9106779da0df62c0c03312fc489171aaa5 (patch)
treea2d5185dea85a478895b799da81e41f8e383cb52 /trie/trie.go
parentde9b0660acf26edc3b261b805c1a3454e3c76321 (diff)
downloadgo-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar.gz
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar.bz2
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar.lz
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar.xz
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.tar.zst
go-tangerine-cf05ef9106779da0df62c0c03312fc489171aaa5.zip
p2p, swarm, trie: avoid copying slices in loops (#17265)
Diffstat (limited to 'trie/trie.go')
-rw-r--r--trie/trie.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/trie/trie.go b/trie/trie.go
index 4284e30ad..e920ccd23 100644
--- a/trie/trie.go
+++ b/trie/trie.go
@@ -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