From 68e52bc03cd3072985ead4895a3ae97f43c02331 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Fri, 27 Oct 2023 16:20:44 +0000 Subject: 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 Reviewed-by: Keith Randall Auto-Submit: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Bryan Mills --- src/bytes/bytes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bytes/bytes.go') 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 } -- cgit v1.3-5-g9baa