]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: reuse calls to TypeOf for wireType
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 25 Mar 2023 11:59:17 +0000 (11:59 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 29 Mar 2023 23:47:35 +0000 (23:47 +0000)
commit72013c47009d99c5ded7407bf80d90bd8ba95d3e
tree2c80d902a33c4c1efad3243d9bed32f1e48b4245
parent4d296bcbc25acb14ef603c6824113758d74b4a31
encoding/gob: reuse calls to TypeOf for wireType

After the previous commit, both calls use the non-pointer type,
so we can deduplicate. No noticeable difference in init cost.

Change-Id: I0f0fb91d42655787cb58b4442ad3da4194560af4
Reviewed-on: https://go-review.googlesource.com/c/go/+/479399
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/encoding/gob/type.go