a little too much faith in copilot there, oops

This commit is contained in:
Steve Dudenhoeffer 2022-09-10 21:43:31 -04:00
parent 340ce63653
commit e598bfcfa1

View File

@ -41,7 +41,8 @@ func (q *PriorityQueue[T]) Pop() (T, bool) {
defer q.lock.Unlock()
if len(q.items) == 0 {
return nil, false
var res T
return res, false
}
item := q.items[0]