From 64f00fb150fff62a144e188e00f59f044ffb7d23 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder <josharian@gmail.com> Date: Sun, 2 Apr 2017 19:12:19 -0700 Subject: [PATCH] cmd/compile: len(n.List.Slice()) -> n.List.Len() Minor cleanup. This is the only such instance in the compiler. Change-Id: I4e8ecde57d71867c7e1ac4d17e2154a91dd262b0 Reviewed-on: https://go-review.googlesource.com/39209 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> --- src/cmd/compile/internal/gc/sinit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/gc/sinit.go b/src/cmd/compile/internal/gc/sinit.go index 365cd69d44..6011f0c0c4 100644 --- a/src/cmd/compile/internal/gc/sinit.go +++ b/src/cmd/compile/internal/gc/sinit.go @@ -927,7 +927,7 @@ func maplit(n *Node, m *Node, init *Nodes) { nerr := nerrors a := nod(OMAKE, nil, nil) - a.List.Set2(typenod(n.Type), nodintconst(int64(len(n.List.Slice())))) + a.List.Set2(typenod(n.Type), nodintconst(int64(n.List.Len()))) litas(m, a, init) // count the initializers -- 2.30.9