Skip to content

Commit d8c3964

Browse files
committed
minor: makeBar needs just priority int
1 parent 0f80003 commit d8c3964

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

progress.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Ba
174174
case p.operateState <- func(ps *pState) {
175175
p.bwg.Add(1)
176176
bs := ps.makeBarState(total, filler, options...)
177-
bar := p.makeBar(bs)
177+
bar := p.makeBar(bs.priority)
178178
if bs.waitBar != nil {
179179
ps.queueBars[bs.waitBar] = &queueBar{bs, bar}
180180
} else {
@@ -189,11 +189,11 @@ func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Ba
189189
}
190190
}
191191

192-
func (p *Progress) makeBar(bs *bState) *Bar {
192+
func (p *Progress) makeBar(priority int) *Bar {
193193
ctx, cancel := context.WithCancel(p.ctx)
194194

195195
bar := &Bar{
196-
priority: bs.priority,
196+
priority: priority,
197197
frameCh: make(chan *renderFrame, 1),
198198
operateState: make(chan func(*bState)),
199199
bsOk: make(chan struct{}),

0 commit comments

Comments
 (0)