a little too much faith in copilot there, oops
This commit is contained in:
parent
340ce63653
commit
e598bfcfa1
@ -41,7 +41,8 @@ func (q *PriorityQueue[T]) Pop() (T, bool) {
|
|||||||
defer q.lock.Unlock()
|
defer q.lock.Unlock()
|
||||||
|
|
||||||
if len(q.items) == 0 {
|
if len(q.items) == 0 {
|
||||||
return nil, false
|
var res T
|
||||||
|
return res, false
|
||||||
}
|
}
|
||||||
|
|
||||||
item := q.items[0]
|
item := q.items[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user