]> Cypherpunks repositories - gostls13.git/commitdiff
internal/runtime/maps: update doc for table.Clear
authorJes Cok <xigua67damn@gmail.com>
Sat, 15 Nov 2025 18:14:27 +0000 (18:14 +0000)
committerKeith Randall <khr@google.com>
Mon, 17 Nov 2025 17:05:17 +0000 (09:05 -0800)
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>
src/internal/runtime/maps/table.go

index fbce099655e79e5319632abd41c2186689c46a89..8a1932e453f3c55ffdff130226fe338450cc939c 100644 (file)
@@ -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