mirror of
https://github.com/golang/go
synced 2024-11-17 20:54:48 -07:00
bytes: remove redundant type conversion
Change-Id: Icafb2d9fd11b23d3acaf9df07e7f90d8bcd829fa
GitHub-Last-Rev: 2b76646055
GitHub-Pull-Request: golang/go#49243
Reviewed-on: https://go-review.googlesource.com/c/go/+/360096
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Martin Möhrmann <martin@golang.org>
This commit is contained in:
parent
243c5ae019
commit
3fa9ee49a0
@ -699,7 +699,7 @@ func ToValidUTF8(s, replacement []byte) []byte {
|
||||
if c < utf8.RuneSelf {
|
||||
i++
|
||||
invalid = false
|
||||
b = append(b, byte(c))
|
||||
b = append(b, c)
|
||||
continue
|
||||
}
|
||||
_, wid := utf8.DecodeRune(s[i:])
|
||||
|
Loading…
Reference in New Issue
Block a user