this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/core/adt: use a named vertexStatus constant rather than 0

"unprocessed" is much clearer than 0, and since it's not an untyped
integer constant, it cannot be mixed up for other types.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I1664686a59c8a69e9e3c493bc785de072babaf89
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198625
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>

+3 -3
+1 -1
internal/core/adt/disjunct.go
··· 502 502 case finalized: 503 503 v.Arcs[i] = arc 504 504 505 - case 0: 505 + case unprocessed: 506 506 a := *arc 507 507 v.Arcs[i] = &a 508 508
+2 -2
internal/core/adt/eval.go
··· 194 194 return 195 195 196 196 case evaluatingArcs: 197 - Assertf(c, v.status > 0, "unexpected status %d", v.status) 197 + Assertf(c, v.status > unprocessed, "unexpected status %d", v.status) 198 198 return 199 199 200 200 case 0: ··· 1787 1787 closeInfo = closeInfo.SpawnRef(arc, IsDef(x), x) 1788 1788 } 1789 1789 1790 - if arc.status == 0 && !inline { 1790 + if arc.status == unprocessed && !inline { 1791 1791 // This is a rare condition, but can happen in certain 1792 1792 // evaluation orders. Unfortunately, adding this breaks 1793 1793 // resolution of cyclic mutually referring disjunctions. But it