mirror of
https://github.com/containers/skopeo.git
synced 2025-09-21 09:57:19 +00:00
fix(deps): update github.com/containers/image/v5 digest to 58d5eb6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
15
vendor/github.com/vbauerster/mpb/v8/priority_queue.go
generated
vendored
15
vendor/github.com/vbauerster/mpb/v8/priority_queue.go
generated
vendored
@@ -20,17 +20,18 @@ func (pq priorityQueue) Swap(i, j int) {
|
||||
}
|
||||
|
||||
func (pq *priorityQueue) Push(x interface{}) {
|
||||
s := *pq
|
||||
n := len(*pq)
|
||||
bar := x.(*Bar)
|
||||
bar.index = len(s)
|
||||
s = append(s, bar)
|
||||
*pq = s
|
||||
bar.index = n
|
||||
*pq = append(*pq, bar)
|
||||
}
|
||||
|
||||
func (pq *priorityQueue) Pop() interface{} {
|
||||
s := *pq
|
||||
*pq = s[0 : len(s)-1]
|
||||
bar := s[len(s)-1]
|
||||
old := *pq
|
||||
n := len(old)
|
||||
bar := old[n-1]
|
||||
old[n-1] = nil // avoid memory leak
|
||||
bar.index = -1 // for safety
|
||||
*pq = old[:n-1]
|
||||
return bar
|
||||
}
|
||||
|
Reference in New Issue
Block a user