()
| 517 | func (pq *priorityQueueImp) Swap(i, j int) { (*pq)[i], (*pq)[j] = (*pq)[j], (*pq)[i] } |
| 518 | func (pq *priorityQueueImp) Push(x any) { *pq = append(*pq, x.(*queueItem)) } |
| 519 | func (pq *priorityQueueImp) Pop() any { |
| 520 | n := len(*pq) |
| 521 | ret := (*pq)[n-1] |
| 522 | (*pq)[n-1] = nil // ovoid memory leak |
| 523 | *pq = (*pq)[0 : n-1] |
| 524 | |
| 525 | return ret |
| 526 | } |
| 527 | func (pq *priorityQueueImp) Peek() *object.Commit { |
| 528 | if len(*pq) == 0 { |
| 529 | return nil |
nothing calls this directly
no outgoing calls
no test coverage detected