Key drawWalk's visits by interned pin sets and the whole table

This commit is contained in:
2026-09-28 22:42:07 +02:00
committed by Lillem4n
parent d03c92ddbf
commit 88f762077f
3 changed files with 43 additions and 32 deletions
-13
View File
@@ -4,7 +4,6 @@ import (
"fmt"
"maps"
"sort"
"strings"
)
type tablePin struct {
@@ -163,15 +162,3 @@ func (p *pinSet) differs(q *pinSet) bool {
})
return found
}
// mapKey spells the set for a map, by the tables' identities in path order.
func (p *pinSet) mapKey() string {
var pins []tablePin
p.each(func(t *table, r int) { pins = append(pins, tablePin{t, r}) })
sort.Slice(pins, func(i, j int) bool { return pins[i].t.path < pins[j].t.path })
var b strings.Builder
for _, q := range pins {
fmt.Fprintf(&b, "%p[%d]", q.t, q.row)
}
return b.String()
}