From 9ba70fb50fefa1f28cd61effccddc587f83695ab Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Tue, 17 Dec 2024 13:28:48 +0530 Subject: [PATCH] chore: fix lint error in pq (#255) --- collections/priorityqueue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/priorityqueue.go b/collections/priorityqueue.go index 1e0921f..f1135a4 100644 --- a/collections/priorityqueue.go +++ b/collections/priorityqueue.go @@ -272,7 +272,7 @@ func (queue *Queue[T]) Dequeue() (T, bool) { // Peek for notBefore v, _ := queue.heap.Peek() if !v.notBefore.IsZero() { - if v.notBefore.Sub(time.Now()) < 0 { + if time.Until(v.notBefore) < 0 { return zero, false } }