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 --- main/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') diff --git a/main/command.go b/main/command.go index 55c7cca..0db545b 100644 --- a/main/command.go +++ b/main/command.go @@ -116,5 +116,5 @@ func (cmd SwapPathCommand) exec(state *ProgramState) { type AppendPathCommand struct {} func (cmd AppendPathCommand) exec(state *ProgramState) { - state.path = append(state.path, state.value...) + state.path = walk.ConcatData(state.path, state.value) } \ No newline at end of file -- cgit v1.2.3