Skip to content

Commit d85d65e

Browse files
committed
PriorityQueue.lookup: change type to map[string]*item
The keys are always strings, so no need to use `any` as the key type.
1 parent f04c863 commit d85d65e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/priorityqueue/priorityqueue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import (
88
// PriorityQueue represents the queue
99
type PriorityQueue struct {
1010
itemHeap *itemHeap
11-
lookup map[any]*item
11+
lookup map[string]*item
1212
}
1313

1414
// New initializes an empty priority queue.
1515
func New() PriorityQueue {
1616
return PriorityQueue{
1717
itemHeap: &itemHeap{},
18-
lookup: make(map[any]*item),
18+
lookup: make(map[string]*item),
1919
}
2020
}
2121

0 commit comments

Comments
 (0)