From 3abc1e5e460738f302e48ea7f369c1466fd044ca Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Tue, 25 Apr 2023 10:20:15 +0100 Subject: Make state.path immutable so it can be a reference instead of copied, improving performance --- walk/walk.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'walk') diff --git a/walk/walk.go b/walk/walk.go index f9bac2a..493bc46 100644 --- a/walk/walk.go +++ b/walk/walk.go @@ -333,17 +333,6 @@ func (in *JSONIn) readString(out []Atom) []Atom { } func (in *JSONIn) Read() (WalkItem, error) { - item, err := in.read() - if err != nil { - return item, err - } - return WalkItem { - Value: item.Value, - Path: append([]Atom{}, item.Path...), - }, err -} - -func (in *JSONIn) read() (WalkItem, error) { restart: // TODO: Escaping // TODO: Don't allow trailing commas -- cgit v1.2.3