From c971d6512e34bafa5357499f2fb78e144a4c966b Mon Sep 17 00:00:00 2001 From: "(Brien Dieterle)" <(briend@gmail.com)> Date: Sun, 25 Apr 2021 21:44:20 +0800 Subject: [PATCH] code cleanup: remove check on length --- pkg/utils/predicates.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/utils/predicates.go b/pkg/utils/predicates.go index 03af38cb7f..126db78105 100644 --- a/pkg/utils/predicates.go +++ b/pkg/utils/predicates.go @@ -95,10 +95,6 @@ type taintsFilterFunc func(*v1.Taint) bool // TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates // all the taints that apply to the filter in given taint list. func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool { - if len(taints) == 0 { - return true - } - for i := range taints { if applyFilter != nil && !applyFilter(&taints[i]) { continue