diff options
| author | Jes Cok <xigua67damn@gmail.com> | 2023-10-27 16:20:44 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-10-31 17:14:04 +0000 |
| commit | 68e52bc03cd3072985ead4895a3ae97f43c02331 (patch) | |
| tree | 6165bee254e5da58fa9f3879eff0e25708c6b080 /src/bytes/bytes.go | |
| parent | cbc403af1d9fa73b99cc07f80a2126771b73adfd (diff) | |
| download | go-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.go | 2 |
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 } |
