mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
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:
parent
9cb4963d18
commit
de1ea5de86
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue