From 86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32 Mon Sep 17 00:00:00 2001 From: Emil Date: Fri, 14 Sep 2018 23:07:13 +0300 Subject: all: simplify s[:] to s where s is a slice (#17673) --- p2p/discover/table.go | 2 +- p2p/discv5/table.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'p2p') diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 0a554bbeb..a130b5494 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -162,7 +162,7 @@ func (tab *Table) ReadRandomNodes(buf []*Node) (n int) { var buckets [][]*Node for _, b := range &tab.buckets { if len(b.entries) > 0 { - buckets = append(buckets, b.entries[:]) + buckets = append(buckets, b.entries) } } if len(buckets) == 0 { diff --git a/p2p/discv5/table.go b/p2p/discv5/table.go index c793be508..4f4b2426f 100644 --- a/p2p/discv5/table.go +++ b/p2p/discv5/table.go @@ -123,7 +123,7 @@ func (tab *Table) readRandomNodes(buf []*Node) (n int) { var buckets [][]*Node for _, b := range &tab.buckets { if len(b.entries) > 0 { - buckets = append(buckets, b.entries[:]) + buckets = append(buckets, b.entries) } } if len(buckets) == 0 { -- cgit