]> Cypherpunks repositories - gostls13.git/commit
strings,bytes: use result of copy in subsequent slicing
authorKeith Randall <khr@golang.org>
Mon, 28 Oct 2024 21:15:13 +0000 (14:15 -0700)
committerKeith Randall <khr@golang.org>
Tue, 29 Oct 2024 16:47:05 +0000 (16:47 +0000)
commit4b30a40d8856cc3f6c8f629a9f825feeaf9848af
tree696fe852c91504a49caa1705b7f5db53d751cd9c
parent4dcbb00be200bc1f88b534c311ed4289eb2fbdd5
strings,bytes: use result of copy in subsequent slicing

This can get rid of a bounds check.
Followup to CL 622240.

Change-Id: I9d0a2c0408b8d274c46136d32d7a5fb09b4aad1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/622955
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/bytes/buffer.go
src/runtime/string.go