<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-04-25 10:20:15 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-04-25 10:20:15 +0100
commit3abc1e5e460738f302e48ea7f369c1466fd044ca (patch)
treea1b253e296a226c1ab11364df3c83f28cd92cf25 /main
parentcce21232cc83060a53ecb3a7c30d7f6fbfd7a529 (diff)
downloadstred-go-3abc1e5e460738f302e48ea7f369c1466fd044ca.tar
Make state.path immutable so it can be a reference instead of copied, improving performance
Diffstat (limited to 'main')
-rw-r--r--main/command.go2
1 files changed, 1 insertions, 1 deletions
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