diff --git a/src/bytes/bytes_test.go b/src/bytes/bytes_test.go index 03f01582c5..f18915c879 100644 --- a/src/bytes/bytes_test.go +++ b/src/bytes/bytes_test.go @@ -891,9 +891,7 @@ func BenchmarkCountSingle(b *testing.B) { b.Fatal("bad count", j, expect) } } - for i := 0; i < len(buf); i++ { - buf[i] = 0 - } + clear(buf) }) }