mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/runtime/maps: update doc for table.Clear
Change-Id: I9456b9fb7ed3bbf6a3c29de24951e02cf8f4635d
GitHub-Last-Rev: 2deaa11725
GitHub-Pull-Request: golang/go#76311
Reviewed-on: https://go-review.googlesource.com/c/go/+/720761
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
c58d075e9a
commit
594129b80c
1 changed files with 1 additions and 1 deletions
|
|
@ -596,7 +596,7 @@ func (t *table) tombstones() uint16 {
|
|||
return (t.capacity*maxAvgGroupLoad)/abi.MapGroupSlots - t.used - t.growthLeft
|
||||
}
|
||||
|
||||
// Clear deletes all entries from the map resulting in an empty map.
|
||||
// Clear deletes all entries from the table resulting in an empty table.
|
||||
func (t *table) Clear(typ *abi.MapType) {
|
||||
mgl := t.maxGrowthLeft()
|
||||
if t.used == 0 && t.growthLeft == mgl { // no current entries and no tombstones
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue