From fff06d86fd4a1302ca2e71acd1b79fd9d7bb56bb Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 19 Jul 2021 14:17:36 +0300 Subject: [PATCH] Optimize indexing --- r.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r.go b/r.go index ca19259..0637ec6 100644 --- a/r.go +++ b/r.go @@ -48,7 +48,7 @@ func (r *Reader) Next() (uint64, error) { if len(p) == 0 { return 0, io.EOF } - idx := bytes.Index(p, []byte{':'}) + idx := bytes.IndexByte(p, ':') if idx == -1 { return 0, errors.New("no length separator found") } -- 2.44.0