types/key: remove copy returning array by value

It's unnecessary. Returning an array value is already a copy.

Updates #cleanup

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: If7f350b61003ea08f16a531b7b4e8ae483617939
This commit is contained in:
Brad Fitzpatrick 2024-02-25 06:39:01 -08:00 committed by Brad Fitzpatrick
parent 8cc5c51888
commit 9a8c2f47f2
1 changed files with 3 additions and 4 deletions

View File

@ -284,11 +284,10 @@ func (k NodePublic) WriteRawWithoutAllocating(bw *bufio.Writer) error {
// Raw32 returns k encoded as 32 raw bytes.
//
// Deprecated: only needed for a single legacy use in the control
// server, don't add more uses.
// server and a few places in the wireguard-go API; don't add
// more uses.
func (k NodePublic) Raw32() [32]byte {
var ret [32]byte
copy(ret[:], k.k[:])
return ret
return k.k
}
// Less reports whether k orders before other, using an undocumented