From e5ec06b3b99e436cb776bacf81c466db6075168b Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 12 Mar 2021 13:30:30 +0100 Subject: [PATCH] Simplify code by removing else block --- ui/stash.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/stash.go b/ui/stash.go index 0df8a52..6e85d58 100644 --- a/ui/stash.go +++ b/ui/stash.go @@ -1236,13 +1236,12 @@ func (m stashModel) headerView() string { if m.filterState == filtering { if localCount+stashedCount+newsCount == 0 { return grayFg("Nothing found.") - } else { - if localCount > 0 { - sections = append(sections, fmt.Sprintf("%d local", localCount)) - } - if stashedCount > 0 { - sections = append(sections, fmt.Sprintf("%d stashed", stashedCount)) - } + } + if localCount > 0 { + sections = append(sections, fmt.Sprintf("%d local", localCount)) + } + if stashedCount > 0 { + sections = append(sections, fmt.Sprintf("%d stashed", stashedCount)) } for i := range sections {