We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d1df561 + 334cc1b commit ded5959Copy full SHA for ded5959
1 file changed
queue.go
@@ -35,8 +35,8 @@ func (q *Queue) resize() {
35
if q.tail > q.head {
36
copy(newBuf, q.buf[q.head:q.tail])
37
} else {
38
- copy(newBuf, q.buf[q.head:len(q.buf)])
39
- copy(newBuf[len(q.buf)-q.head:], q.buf[:q.tail])
+ n := copy(newBuf, q.buf[q.head:])
+ copy(newBuf[n:], q.buf[:q.tail])
40
}
41
42
q.head = 0
0 commit comments