From edc0455c5c257d90babe4a32eefbb741e3d5013a Mon Sep 17 00:00:00 2001 From: mantuliu <240951888@qq.com> Date: Wed, 22 Feb 2023 00:51:55 +0800 Subject: [PATCH] Improve performance of method haveOverlap Signed-off-by: mantuliu <240951888@qq.com> --- .../framework/plugins/volumerestrictions/volume_restrictions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go index 1c24cb0e977..b73752051ef 100644 --- a/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go +++ b/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go @@ -144,7 +144,7 @@ func haveOverlap(a1, a2 []string) bool { if len(a1) > len(a2) { a1, a2 = a2, a1 } - m := sets.New[string](a1...) + m := sets.New(a1...) for _, val := range a2 { if _, ok := m[val]; ok { return true