mirror of
https://github.com/golang/go.git
synced 2025-10-19 19:13:18 +00:00
bytes: use clear in test
Replace for loop with clear built-in, available since Go 1.21. Change-Id: I66d0124b9004ffd0b52abb679ccff86bb600c1e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/704878 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev>
This commit is contained in:
parent
f9701d21d2
commit
00bf24fdca
1 changed files with 1 additions and 3 deletions
|
@ -891,9 +891,7 @@ func BenchmarkCountSingle(b *testing.B) {
|
||||||
b.Fatal("bad count", j, expect)
|
b.Fatal("bad count", j, expect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i := 0; i < len(buf); i++ {
|
clear(buf)
|
||||||
buf[i] = 0
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue