crypto/tls: skip unnecessary type conversion

Both ec.raw and the assigned enc are []byte and don't require an
explicit conversion.

Change-Id: I2f0e7c161b653269ee450fefe5a49fc9e9e42fd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/790301
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
yuhan6665
2026-09-10 23:05:36 -04:00
parent ed6f4f7375
commit addbbfc438
+1 -1
View File
@@ -55,7 +55,7 @@ func (e *echConfigErr) Error() string {
func parseECHConfig(enc []byte) (skip bool, ec EchConfig, err error) {
s := cryptobyte.String(enc)
ec.raw = []byte(enc)
ec.raw = enc
if !s.ReadUint16(&ec.Version) {
return false, EchConfig{}, &echConfigErr{"version"}
}