Codebase list golang-gopkg-eapache-queue.v1 / upstream/latest
Merge pull request #5 from canni/master Small arithmetic simplification Evan Huus 8 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3434 if q.tail > q.head {
3535 copy(newBuf, q.buf[q.head:q.tail])
3636 } else {
37 copy(newBuf, q.buf[q.head:len(q.buf)])
38 copy(newBuf[len(q.buf)-q.head:], q.buf[:q.tail])
37 n := copy(newBuf, q.buf[q.head:])
38 copy(newBuf[n:], q.buf[:q.tail])
3939 }
4040
4141 q.head = 0