Give Fake a local hold set, as the other renders have, and drop the done round item
This commit is contained in:
+1
-2
@@ -34,8 +34,7 @@ type Generator struct {
|
||||
mu sync.Mutex
|
||||
rand *session
|
||||
categories map[string]node
|
||||
root folder // the categories as the node a path walks from, owned here so a walk allocates none
|
||||
set holdSet // one Fake's hold set, owned here so a walk pinning rows keeps them off the heap
|
||||
root folder // the categories as the node a path walks from, owned here so a walk allocates none
|
||||
records map[node]recordShape
|
||||
structs map[reflect.Type]structResult
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func (f *Generator) Fake(path string) (string, error) {
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("fejkdata: %w", err)
|
||||
}
|
||||
f.set = holdSet{}
|
||||
sc := renderScope{set: &f.set}
|
||||
var set holdSet
|
||||
sc := renderScope{set: &set}
|
||||
f.root.children = f.categories
|
||||
n, err := descend(f.rand, &f.root, segments, sc)
|
||||
if err != nil {
|
||||
|
||||
@@ -23,9 +23,6 @@ Shape 5.8, Self-sufficiency 5.7), every seat capped by Locality, all nine naming
|
||||
|
||||
This round, in order:
|
||||
|
||||
- Give `Fake` a local hold set like `FakeRecord`, `RecordTemplate.Fake` and
|
||||
`FakeStruct`, or state at `Generator.set` why it alone needs one: four seats read the
|
||||
field's heap claim as contradicted by the other three.
|
||||
- Spell every panic an earlier check makes unreachable with one greppable phrase: the
|
||||
17 say "reached prep unvalidated", "should have been proved", "with no row pinned"
|
||||
and more, so a user's report greps to nothing.
|
||||
|
||||
Reference in New Issue
Block a user