aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2017-08-15 21:15:26 +0100
committerDaniel Martí <mvdan@mvdan.cc>2017-08-28 06:52:55 +0000
commit5d39af9d9bac91b84b9944b1edffc6fb332747fa (patch)
tree5569c6e045c8509b6e250fae3c41feb9cb5dc3dd /src/testing
parent0c4d035ca884c9150ab4114922e29f457b45b996 (diff)
downloadgo-5d39af9d9bac91b84b9944b1edffc6fb332747fa.tar.xz
all: remove some unused result params
Most of these are return values that were part of a receiving parameter, so they're still accessible. A few others are not, but those have never had a use. Found with github.com/mvdan/unparam, after Kevin Burke's suggestion that the tool should also warn about unused result parameters. Change-Id: Id8b5ed89912a99db22027703a88bd94d0b292b8b Reviewed-on: https://go-review.googlesource.com/55910 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/benchmark.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go
index 0a08cca7b3..d592afbf87 100644
--- a/src/testing/benchmark.go
+++ b/src/testing/benchmark.go
@@ -238,7 +238,7 @@ var labelsOnce sync.Once
// run executes the benchmark in a separate goroutine, including all of its
// subbenchmarks. b must not have subbenchmarks.
-func (b *B) run() BenchmarkResult {
+func (b *B) run() {
labelsOnce.Do(func() {
fmt.Fprintf(b.w, "goos: %s\n", runtime.GOOS)
fmt.Fprintf(b.w, "goarch: %s\n", runtime.GOARCH)
@@ -253,7 +253,6 @@ func (b *B) run() BenchmarkResult {
// Running func Benchmark.
b.doBench()
}
- return b.result
}
func (b *B) doBench() BenchmarkResult {