diff --git a/cmd/queue.go b/cmd/queue.go index 06cafd1..af9ef44 100644 --- a/cmd/queue.go +++ b/cmd/queue.go @@ -22,7 +22,7 @@ func (q *Queue[T]) Pop() (*T, bool) { defer q.lock.Unlock() val := q.slice[0] - if len(q.slice) != 0 { + if len(q.slice) > 1 { q.slice = q.slice[1:] q.Size-- }