strings: minor cleanup

bi is a slice and not an array, so bi[:] does not make much sense.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/79280043
This commit is contained in:
Rui Ueyama 2014-03-23 18:58:35 -07:00 committed by Brad Fitzpatrick
parent 9cb4963d18
commit de1ea5de86

View file

@ -492,7 +492,7 @@ func (r *byteStringReplacer) Replace(s string) string {
for i := 0; i < len(s); i++ {
b := s[i]
if r.old[b>>5]&uint32(1<<(b&31)) != 0 {
n := copy(bi[:], r.new[b])
n := copy(bi, r.new[b])
bi = bi[n:]
} else {
bi[0] = b