aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/bytes.go
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2023-10-27 16:20:44 +0000
committerGopher Robot <gobot@golang.org>2023-10-31 17:14:04 +0000
commit68e52bc03cd3072985ead4895a3ae97f43c02331 (patch)
tree6165bee254e5da58fa9f3879eff0e25708c6b080 /src/bytes/bytes.go
parentcbc403af1d9fa73b99cc07f80a2126771b73adfd (diff)
downloadgo-68e52bc03cd3072985ead4895a3ae97f43c02331.tar.xz
bytes,internal/bytealg: eliminate IndexRabinKarpBytes using generics
This is a follow-up to CL 538175. Change-Id: Iec2523b36a16d7e157c17858c89fcd43c2470d58 GitHub-Last-Rev: 812d36e57c71ea3bf44d2d64bde0703ef02a1b91 GitHub-Pull-Request: golang/go#63770 Reviewed-on: https://go-review.googlesource.com/c/go/+/538195 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/bytes/bytes.go')
-rw-r--r--src/bytes/bytes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go
index 95afb30b40..c84accd8f5 100644
--- a/src/bytes/bytes.go
+++ b/src/bytes/bytes.go
@@ -1331,7 +1331,7 @@ func Index(s, sep []byte) int {
// we should cutover at even larger average skips,
// because Equal becomes that much more expensive.
// This code does not take that effect into account.
- j := bytealg.IndexRabinKarpBytes(s[i:], sep)
+ j := bytealg.IndexRabinKarp(s[i:], sep)
if j < 0 {
return -1
}