]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: slightly simplify init code
authorDaniel Martí <mvdan@mvdan.cc>
Fri, 20 Jan 2023 21:53:34 +0000 (21:53 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 24 Jan 2023 20:07:49 +0000 (20:07 +0000)
commit43f9b826c322d5541ca0260f8b0c9b71db0f7ec8
treea463ae41932436daa6064a9b59e7137c76f2f7cc
parentffbd194f5cf399a98578ea950c969d07a751ecfd
encoding/gob: slightly simplify init code

https://go.dev/cl/460543 stopped using the "expect" parameter in
bootstrapType, but we forgot to actually remove it.

While here, staticcheck correctly points out that we can use the copy
builtin to fill builtinIdToTypeSlice, now that it and idToType are an
array and slice respectively.

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