Codebase list golang-github-vbauerster-mpb / 57ab977
simplify map check Vladimir Bauer 7 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
269269 // only after the bar with completed state has been flushed. this
270270 // ensures no bar ends up with less than 100% rendered.
271271 s.shutdownPending = append(s.shutdownPending, bar)
272 if replacementBar, ok := s.parkedBars[bar]; ok {
273 heap.Push(s.bHeap, replacementBar)
272 if parkedBar := s.parkedBars[bar]; parkedBar != nil {
273 heap.Push(s.bHeap, parkedBar)
274274 s.heapUpdated = true
275275 delete(s.parkedBars, bar)
276276 }