Codebase list golang-github-vbauerster-mpb / d224337
minor: var refactoring Vladimir Bauer 3 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
288288 rows := make([]io.Reader, 0, height)
289289 pool := make([]*Bar, 0, s.bHeap.Len())
290290 for s.bHeap.Len() > 0 {
291 var frameRowsUsed int
291 var usedRows int
292292 b := heap.Pop(&s.bHeap).(*Bar)
293293 frame := <-b.frameCh
294294 for i := len(frame.rows) - 1; i >= 0; i-- {
295295 if len(rows) < height {
296296 rows = append(rows, frame.rows[i])
297 frameRowsUsed++
297 usedRows++
298298 } else {
299299 wg.Add(1)
300300 go func(discardRow io.Reader) {
313313 drop = true
314314 } else if s.popCompleted && !b.bs.noPop {
315315 if frame.shutdown > 1 {
316 popCount += frameRowsUsed
316 popCount += usedRows
317317 drop = true
318318 } else {
319319 s.popPriority++