From bbb79f2d6a107571599ce30189e92bf6d1e5d7fb Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 18 May 2021 08:52:10 -0700 Subject: [PATCH] internal/deephash: fix accidental naked return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit name old time/op new time/op delta Hash-8 23.0µs ± 1% 22.4µs ± 0% -2.43% (p=0.008 n=5+5) HashMapAcyclic-8 24.0µs ± 0% 23.8µs ± 0% -0.56% (p=0.008 n=5+5) name old alloc/op new alloc/op delta Hash-8 2.92kB ± 0% 2.49kB ± 0% -14.80% (p=0.000 n=5+4) HashMapAcyclic-8 2.53kB ± 0% 2.53kB ± 0% ~ (all equal) name old allocs/op new allocs/op delta Hash-8 93.0 ± 0% 86.0 ± 0% -7.53% (p=0.008 n=5+5) HashMapAcyclic-8 202 ± 0% 202 ± 0% ~ (all equal) Signed-off-by: Josh Bleecher Snyder --- internal/deephash/deephash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/deephash/deephash.go b/internal/deephash/deephash.go index c162fbdc4..d1a5a8687 100644 --- a/internal/deephash/deephash.go +++ b/internal/deephash/deephash.go @@ -114,7 +114,7 @@ func print(w *bufio.Writer, v reflect.Value, visited map[uintptr]bool) (acyclic x := v.Interface().(tailcfg.DiscoKey) w.Write(x[:]) } - return + return true } }