diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-12-19 13:29:25 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-12-20 09:30:47 -0500 |
commit | 50ece79387dcf6c748e3ae1bd6a7067059c0dfe3 (patch) | |
tree | 6b30c4f66f7be315ff2257447be3818be98fb50f /vendor/github.com/vbauerster/mpb/priority_queue.go | |
parent | a359ca0d1825859dd8b7c1384f11d703ec6625b4 (diff) | |
download | podman-50ece79387dcf6c748e3ae1bd6a7067059c0dfe3.tar.gz podman-50ece79387dcf6c748e3ae1bd6a7067059c0dfe3.tar.bz2 podman-50ece79387dcf6c748e3ae1bd6a7067059c0dfe3.zip |
build(deps): bump github.com/containers/image/v5 from 5.0.0 to 5.1.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.0.0...v5.1.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/priority_queue.go')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/priority_queue.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/vbauerster/mpb/priority_queue.go b/vendor/github.com/vbauerster/mpb/priority_queue.go deleted file mode 100644 index 7bc588c29..000000000 --- a/vendor/github.com/vbauerster/mpb/priority_queue.go +++ /dev/null @@ -1,40 +0,0 @@ -package mpb - -import "container/heap" - -// A priorityQueue implements heap.Interface -type priorityQueue []*Bar - -func (pq priorityQueue) Len() int { return len(pq) } - -func (pq priorityQueue) Less(i, j int) bool { - return pq[i].priority < pq[j].priority -} - -func (pq priorityQueue) Swap(i, j int) { - pq[i], pq[j] = pq[j], pq[i] - pq[i].index = i - pq[j].index = j -} - -func (pq *priorityQueue) Push(x interface{}) { - n := len(*pq) - bar := x.(*Bar) - bar.index = n - *pq = append(*pq, bar) -} - -func (pq *priorityQueue) Pop() interface{} { - old := *pq - n := len(old) - bar := old[n-1] - bar.index = -1 // for safety - *pq = old[0 : n-1] - return bar -} - -// update modifies the priority of a Bar in the queue. -func (pq *priorityQueue) update(bar *Bar, priority int) { - bar.priority = priority - heap.Fix(pq, bar.index) -} |