From: Jes Cok Date: Sat, 15 Nov 2025 18:14:27 +0000 (+0000) Subject: internal/runtime/maps: update doc for table.Clear X-Git-Tag: go1.26rc1~265 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=594129b80c;p=gostls13.git internal/runtime/maps: update doc for table.Clear 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 Reviewed-by: Keith Randall Reviewed-by: Michael Pratt --- diff --git a/src/internal/runtime/maps/table.go b/src/internal/runtime/maps/table.go index fbce099655..8a1932e453 100644 --- a/src/internal/runtime/maps/table.go +++ b/src/internal/runtime/maps/table.go @@ -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