From 11ce6eabd6073d342d57925af5bbfc0215540ddc Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Sun, 9 Dec 2018 13:37:17 +0100 Subject: [PATCH] math/bits: remove named return in TrailingZeros16 TrailingZeros16 is the only one of the TrailingZeros functions with a named return value in the signature. This creates a sligthly unpleasant effect in the godoc listing: func TrailingZeros(x uint) int func TrailingZeros16(x uint16) (n int) func TrailingZeros32(x uint32) int func TrailingZeros64(x uint64) int func TrailingZeros8(x uint8) int Since the named return value is not even used, remove it. Change-Id: I15c5aedb6157003911b6e0685c357ce56e466c0e Reviewed-on: https://go-review.googlesource.com/c/153340 Reviewed-by: Brad Fitzpatrick --- src/math/bits/bits.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/bits/bits.go b/src/math/bits/bits.go index 9da1c6e580..b06c363348 100644 --- a/src/math/bits/bits.go +++ b/src/math/bits/bits.go @@ -65,7 +65,7 @@ func TrailingZeros8(x uint8) int { } // TrailingZeros16 returns the number of trailing zero bits in x; the result is 16 for x == 0. -func TrailingZeros16(x uint16) (n int) { +func TrailingZeros16(x uint16) int { if x == 0 { return 16 } -- 2.50.0