Codebase list golang-github-vbauerster-mpb / aa4ed86
better var type and name Vladimir Bauer 4 years ago
1 changed file(s) with 8 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
295295 if drop {
296296 b.container.dropBar(b)
297297 } else {
298 var uncompleted int
298 var anyOtherUncompleted bool
299299 b.container.traverseBars(func(bar *Bar) bool {
300 if b != bar && !bar.Completed() {
301 uncompleted++
302 return false
303 }
304 return true
300 anyOtherUncompleted = b != bar && !bar.Completed()
301 return !anyOtherUncompleted
305302 })
306 if uncompleted == 0 {
303 if !anyOtherUncompleted {
307304 b.container.refreshCh <- time.Now()
308305 }
309306 }
385382 }
386383
387384 func (b *Bar) forceRefreshIfLastUncompleted() {
388 var uncompleted int
385 var anyOtherUncompleted bool
389386 b.container.traverseBars(func(bar *Bar) bool {
390 if b != bar && !bar.Completed() {
391 uncompleted++
392 return false
393 }
394 return true
387 anyOtherUncompleted = b != bar && !bar.Completed()
388 return !anyOtherUncompleted
395389 })
396 if uncompleted == 0 {
390 if !anyOtherUncompleted {
397391 for {
398392 select {
399393 case b.container.refreshCh <- time.Now():