Skip to content

Commit

Permalink
chore: replace loop with n.Values = append(n.Values, target.Values...) (
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Jul 25, 2023
1 parent 6a080f2 commit 42fb764
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,7 @@ func (n *SequenceNode) Replace(idx int, value Node) error {
func (n *SequenceNode) Merge(target *SequenceNode) {
column := n.Start.Position.Column - target.Start.Position.Column
target.AddColumn(column)
for _, value := range target.Values {
n.Values = append(n.Values, value)
}
n.Values = append(n.Values, target.Values...)
}

// SetIsFlowStyle set value to IsFlowStyle field recursively.
Expand Down

0 comments on commit 42fb764

Please sign in to comment.