From 08e80381fbe7bbad5db7b134d8bcfebd6d3ae842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 23 Mar 2026 11:07:15 +0000 Subject: [PATCH] internal/pkg: remove unnecessary runtime fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These have been present since 2022, but were never actually used. Signed-off-by: Daniel Martí Change-Id: I8bb50674840196db3084eb0cb72fe5316fba6122 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1234438 Reviewed-by: Marcel van Lohuizen Unity-Result: CUE porcuepine TryBot-Result: CUEcueckoo --- internal/pkg/context.go | 4 ++-- internal/pkg/types.go | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/internal/pkg/context.go b/internal/pkg/context.go index db68b6007..567d79f54 100644 --- a/internal/pkg/context.go +++ b/internal/pkg/context.go @@ -79,7 +79,7 @@ func (c *CallCtxt) Struct(i int) Struct { switch v, ok := x.(*adt.Vertex); { case ok && !v.IsList(): v.CompleteArcs(c.ctx) - return Struct{c.ctx, v} + return Struct{v} case v != nil: x = v.Value() @@ -302,7 +302,7 @@ func (c *CallCtxt) CueList(i int) List { if v == nil { return List{} } - return List{c.ctx, v, v.BaseValue.(*adt.ListMarker).IsOpen} + return List{v, v.BaseValue.(*adt.ListMarker).IsOpen} } func (c *CallCtxt) Iter(i int) (a cue.Iterator) { diff --git a/internal/pkg/types.go b/internal/pkg/types.go index 63fc40923..d60f79ec8 100644 --- a/internal/pkg/types.go +++ b/internal/pkg/types.go @@ -27,9 +27,8 @@ type Schema = cue.Value // List represents a CUE list, which can be open or closed. type List struct { - runtime adt.Runtime - node *adt.Vertex - isOpen bool + node *adt.Vertex + isOpen bool } // Elems returns the elements of a list. @@ -44,8 +43,7 @@ func (l *List) IsOpen() bool { // Struct represents a CUE struct, which can be open or closed. type Struct struct { - runtime adt.Runtime - node *adt.Vertex + node *adt.Vertex } // Arcs returns all arcs of s. -- 2.51.2