We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18585de commit cbc470eCopy full SHA for cbc470e
queue.go
@@ -420,11 +420,11 @@ func (q *LinkedListQueue) Shift() (interface{}, error) {
420
if q.first == nil {
421
q.last = nil
422
}
423
- val := node.Val
+ val := *node.Val
424
425
q.recycleNode(node)
426
427
- return *val, nil
+ return val, nil
428
429
430
// Unshift Unshift the val to the first position(non-blocking)
@@ -460,10 +460,10 @@ func (q *LinkedListQueue) Pop() (interface{}, error) {
460
if q.last == nil {
461
q.first = nil
462
463
464
465
466
467
468
469
// Push Push the data to the last position(non-blocking)
0 commit comments