Skip to content

Commit 04e142a

Browse files
committed
+= notation
1 parent 98ef0e8 commit 04e142a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (q *Queue) Peek() interface{} {
7171
func (q *Queue) Get(i int) interface{} {
7272
// If indexing backwards, convert to positive index.
7373
if i < 0 {
74-
i = q.count + i
74+
i += q.count
7575
}
7676
if i < 0 || i >= q.count {
7777
panic("queue: Get() called with index out of range")

0 commit comments

Comments
 (0)