Skip to content

Commit bad7653

Browse files
author
Kate Osborn
committed
Remove temp var in swap
1 parent 9b30f40 commit bad7653

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/events/loop.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ func (el *EventLoop) Start(ctx context.Context) error {
137137

138138
// swapBatches swaps the current and next batches.
139139
func (el *EventLoop) swapBatches() {
140-
temp := el.currentBatch
141-
el.currentBatch = el.nextBatch
142-
el.nextBatch = temp[:0]
140+
el.currentBatch, el.nextBatch = el.nextBatch, el.currentBatch
141+
el.nextBatch = el.nextBatch[:0]
143142
}

0 commit comments

Comments
 (0)