Enhance readability by extracting bitwise operation

Fixes https://github.com/helm/helm/pull/8282#discussion_r458368780

Signed-off-by: Andrew Melis <andrewmelis@gmail.com>
pull/8282/head
Andrew Melis 4 years ago
parent 70f89e5f26
commit f9d35242d0

@ -250,7 +250,8 @@ func (l *List) filterStateMask(releases []*release.Release) []*release.Release {
for _, rls := range releases {
currentStatus := l.StateMask.FromName(rls.Info.Status.String())
if l.StateMask&currentStatus == 0 {
mask := l.StateMask & currentStatus
if mask == 0 {
continue
}
desiredStateReleases = append(desiredStateReleases, rls)

Loading…
Cancel
Save