diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-20 16:18:58 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-24 20:14:41 +1100 |
commit | 99e55725fb0783bc3280498ec6047350368c25d7 (patch) | |
tree | cd7e95d2daa3ff806a9f0146c5bac1c0c5d45bac /pkg/commands | |
parent | 340a145bc8af32123550f6b4db5104f61417c019 (diff) |
simplify
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/bisect_info.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pkg/commands/git_commands/bisect_info.go b/pkg/commands/git_commands/bisect_info.go index 5b3b1f028..ea20d0d38 100644 --- a/pkg/commands/git_commands/bisect_info.go +++ b/pkg/commands/git_commands/bisect_info.go @@ -1,6 +1,10 @@ package git_commands -import "github.com/sirupsen/logrus" +import ( + "github.com/jesseduffield/generics/maps" + "github.com/jesseduffield/generics/slices" + "github.com/sirupsen/logrus" +) // although the typical terms in a git bisect are 'bad' and 'good', they're more // generally known as 'new' and 'old'. Semi-recently git allowed the user to define @@ -93,11 +97,5 @@ func (self *BisectInfo) Bisecting() bool { return false } - for _, status := range self.statusMap { - if status == BisectStatusOld { - return true - } - } - - return false + return slices.Contains(maps.Values(self.statusMap), BisectStatusOld) } |