aboutsummaryrefslogtreecommitdiff
path: root/src/bytes
diff options
context:
space:
mode:
authorAlexander Melentyev <alexander@melentyev.org>2021-10-31 17:50:22 +0000
committerTobias Klauser <tobias.klauser@gmail.com>2021-10-31 17:52:41 +0000
commit3fa9ee49a077a0bcb7419110da02ca54a019f2cc (patch)
tree26e059e28a986d9f6260d9d33e534c3e0bf170dc /src/bytes
parent243c5ae019bab96caf55dd443a0ecd128f079d9c (diff)
downloadgo-3fa9ee49a077a0bcb7419110da02ca54a019f2cc.tar.gz
go-3fa9ee49a077a0bcb7419110da02ca54a019f2cc.zip
bytes: remove redundant type conversion
Change-Id: Icafb2d9fd11b23d3acaf9df07e7f90d8bcd829fa GitHub-Last-Rev: 2b766460554860510f3fec03a4b9fe2e65fad268 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>
Diffstat (limited to 'src/bytes')
-rw-r--r--src/bytes/bytes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go
index 926f65cc8f..529d95a888 100644
--- a/src/bytes/bytes.go
+++ b/src/bytes/bytes.go
@@ -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:])