diff options
| author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-25 10:20:15 +0100 | 
|---|---|---|
| committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-25 10:20:15 +0100 | 
| commit | 3abc1e5e460738f302e48ea7f369c1466fd044ca (patch) | |
| tree | a1b253e296a226c1ab11364df3c83f28cd92cf25 /walk | |
| parent | cce21232cc83060a53ecb3a7c30d7f6fbfd7a529 (diff) | |
| download | stred-go-3abc1e5e460738f302e48ea7f369c1466fd044ca.tar | |
Make state.path immutable so it can be a reference instead of copied, improving performance
Diffstat (limited to 'walk')
| -rw-r--r-- | walk/walk.go | 11 | 
1 files changed, 0 insertions, 11 deletions
| 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 | 
