From e598bfcfa16ebcd82b106fd80e9eceda4175e78d Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Sat, 10 Sep 2022 21:43:31 -0400 Subject: [PATCH] a little too much faith in copilot there, oops --- priorityqueue.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/priorityqueue.go b/priorityqueue.go index 7d700a3..a2330a8 100644 --- a/priorityqueue.go +++ b/priorityqueue.go @@ -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]