]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/xml: use bytes.Buffer.WriteString
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 4 Aug 2022 10:55:33 +0000 (11:55 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 9 Aug 2022 18:32:01 +0000 (18:32 +0000)
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>
src/encoding/xml/xml.go

index 4a8c154802235f6e1b711e4583c332d665502162..3459a8604f9fda038dba7e64a4f5c4c23f00e139 100644 (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
                        }