From 7cd0a4be5cdbb84142ec330daba6087eece48341 Mon Sep 17 00:00:00 2001 From: nlwkobe30 Date: Fri, 30 Aug 2024 19:05:07 +0000 Subject: all: omit unnecessary 0 in slice expression All changes are related to the code, except for the comments in src/regexp/syntax/parse.go and src/slices/slices.go. Change-Id: I73c5d3c54099749b62210aa7f3182c5eb84bb6a6 GitHub-Last-Rev: 794aa9b0539811d00e1cd42be1e8d9fe9afe0281 GitHub-Pull-Request: golang/go#69170 Reviewed-on: https://go-review.googlesource.com/c/go/+/609678 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/math/big/natdiv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/math') diff --git a/src/math/big/natdiv.go b/src/math/big/natdiv.go index b55f9990cd..96a41c0ace 100644 --- a/src/math/big/natdiv.go +++ b/src/math/big/natdiv.go @@ -602,7 +602,7 @@ func (z nat) divLarge(u, uIn, vIn nat) (q, r nat) { v := *vp shlVU(v, vIn, shift) u = u.make(len(uIn) + 1) - u[len(uIn)] = shlVU(u[0:len(uIn)], uIn, shift) + u[len(uIn)] = shlVU(u[:len(uIn)], uIn, shift) // The caller should not pass aliased z and u, since those are // the two different outputs, but correct just in case. @@ -884,7 +884,7 @@ func (z nat) divRecursiveStep(u, v nat, depth int, tmp *nat, temps []*nat) { if qhatv.cmp(u.norm()) > 0 { panic("impossible") } - c := subVV(u[0:len(qhatv)], u[0:len(qhatv)], qhatv) + c := subVV(u[:len(qhatv)], u[:len(qhatv)], qhatv) if c > 0 { c = subVW(u[len(qhatv):], u[len(qhatv):], c) } -- cgit v1.3