fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.1

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-05-13 15:58:27 +00:00
committed by GitHub
parent 76e11cf5fc
commit fe84fbae72
8 changed files with 44 additions and 64 deletions

View File

@@ -20,18 +20,18 @@ func (pq priorityQueue) Swap(i, j int) {
}
func (pq *priorityQueue) Push(x interface{}) {
n := len(*pq)
s := *pq
bar := x.(*Bar)
bar.index = n
*pq = append(*pq, bar)
bar.index = len(s)
*pq = append(s, bar)
}
func (pq *priorityQueue) Pop() interface{} {
old := *pq
n := len(old)
bar := old[n-1]
old[n-1] = nil // avoid memory leak
s := *pq
l := len(s)
bar := s[l-1]
bar.index = -1 // for safety
*pq = old[:n-1]
s[l-1] = nil // avoid memory leak
*pq = s[:l-1]
return bar
}