From 06583274fa64ad6677773bf4ca54f69226388203 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 28 Mar 2026 17:40:02 +0000 Subject: commitquery: Make a reusable engine thingy --- commitquery/priority_queue.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commitquery/priority_queue.go') diff --git a/commitquery/priority_queue.go b/commitquery/priority_queue.go index 0d948c64..8651ea0b 100644 --- a/commitquery/priority_queue.go +++ b/commitquery/priority_queue.go @@ -4,12 +4,12 @@ import "container/heap" // priorityQueue orders internal nodes using one query context's comparator. type priorityQueue struct { - query *Query + query *query items []nodeIndex } // newPriorityQueue builds one empty priority queue over one query context. -func newPriorityQueue(query *Query) *priorityQueue { +func newPriorityQueue(query *query) *priorityQueue { queue := &priorityQueue{query: query} heap.Init(queue) @@ -67,7 +67,7 @@ func (queue *priorityQueue) PopNode() nodeIndex { return idx } -func (query *Query) queueHasNonStale(queue *priorityQueue) bool { +func (query *query) queueHasNonStale(queue *priorityQueue) bool { // TODO for _, idx := range queue.items { if !query.hasAnyMarks(idx, markStale) { -- cgit v1.3.1-10-gc9f91