diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2022-03-10 12:10:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 12:10:45 +0000 |
commit | a5353207c7c08c5ea81c8c358241b6a61173e93c (patch) | |
tree | 10a5d52ac81dec667b7de9d0e1d9f0138f6af8df /vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go | |
parent | acfcecf2ae41528d1d7ecd43d37d8fd554f587bc (diff) | |
download | podman-a5353207c7c08c5ea81c8c358241b6a61173e93c.tar.gz podman-a5353207c7c08c5ea81c8c358241b6a61173e93c.tar.bz2 podman-a5353207c7c08c5ea81c8c358241b6a61173e93c.zip |
Bump github.com/vbauerster/mpb/v7 from 7.3.2 to 7.4.1
Bumps [github.com/vbauerster/mpb/v7](https://github.com/vbauerster/mpb) from 7.3.2 to 7.4.1.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](https://github.com/vbauerster/mpb/compare/v7.3.2...v7.4.1)
---
updated-dependencies:
- dependency-name: github.com/vbauerster/mpb/v7
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go b/vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go index 54b7bfd6f..d8bf90a4a 100644 --- a/vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go +++ b/vendor/github.com/vbauerster/mpb/v7/bar_filler_bar.go @@ -157,9 +157,8 @@ func (s *bFiller) Fill(w io.Writer, width int, stat decor.Statistics) { return } - ow := optimisticWriter(w) - ow(s.components[iLbound].bytes) - defer ow(s.components[iRbound].bytes) + mustWrite(w, s.components[iLbound].bytes) + defer mustWrite(w, s.components[iRbound].bytes) if width == 0 { return @@ -231,26 +230,24 @@ func (s *bFiller) Fill(w io.Writer, width int, stat decor.Statistics) { } if s.rev { - flush(ow, padding, filling) + flush(w, padding, filling) } else { - flush(ow, filling, padding) + flush(w, filling, padding) } } -func flush(ow func([]byte), filling, padding [][]byte) { +func flush(w io.Writer, filling, padding [][]byte) { for i := len(filling) - 1; i >= 0; i-- { - ow(filling[i]) + mustWrite(w, filling[i]) } for i := 0; i < len(padding); i++ { - ow(padding[i]) + mustWrite(w, padding[i]) } } -func optimisticWriter(w io.Writer) func([]byte) { - return func(p []byte) { - _, err := w.Write(p) - if err != nil { - panic(err) - } +func mustWrite(w io.Writer, p []byte) { + _, err := w.Write(p) + if err != nil { + panic(err) } } |