Change-Id: I9456b9fb7ed3bbf6a3c29de24951e02cf8f4635d
GitHub-Last-Rev:
2deaa1172570c8b477275dd636c092913692661b
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>
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