encoding/xml: use bytes.Buffer.WriteString

Change-Id: Icb0b917c48252ed8831e6c07109c1bc2d2438a42
Reviewed-on: https://go-review.googlesource.com/c/go/+/421234
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: hopehook <hopehook@qq.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Dan Kortschak <dan@kortschak.io>
This commit is contained in:
Daniel Martí 2022-08-04 11:55:33 +01:00
parent 469a87d7a5
commit beebd537ca

View file

@ -1100,7 +1100,7 @@ Input:
if haveText {
d.buf.Truncate(before)
d.buf.Write([]byte(text))
d.buf.WriteString(text)
b0, b1 = 0, 0
continue Input
}