Codebase list golang-github-vbauerster-mpb / 4549b30
code style: omit inner if with help of && Vladimir Bauer 4 years ago
1 changed file(s) with 6 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
280280 go func() {
281281 var uncompleted int
282282 b.container.traverseBars(func(bar *Bar) bool {
283 if b != bar {
284 if !bar.Completed() {
285 uncompleted++
286 return false
287 }
283 if b != bar && !bar.Completed() {
284 uncompleted++
285 return false
288286 }
289287 return true
290288 })
391389 func (b *Bar) forceRefreshIfLastUncompleted() {
392390 var uncompleted int
393391 b.container.traverseBars(func(bar *Bar) bool {
394 if b != bar {
395 if !bar.Completed() {
396 uncompleted++
397 return false
398 }
392 if b != bar && !bar.Completed() {
393 uncompleted++
394 return false
399395 }
400396 return true
401397 })