mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
code cleanup: remove check on length
This commit is contained in:
@@ -95,10 +95,6 @@ type taintsFilterFunc func(*v1.Taint) bool
|
|||||||
// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates
|
// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates
|
||||||
// all the taints that apply to the filter in given taint list.
|
// all the taints that apply to the filter in given taint list.
|
||||||
func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool {
|
func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool {
|
||||||
if len(taints) == 0 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range taints {
|
for i := range taints {
|
||||||
if applyFilter != nil && !applyFilter(&taints[i]) {
|
if applyFilter != nil && !applyFilter(&taints[i]) {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user