From 252385e39c744af6205659b010e41ca6f3414161 Mon Sep 17 00:00:00 2001 From: guangwu Date: Thu, 30 Nov 2023 19:18:05 +0800 Subject: [PATCH] chore: replace for loop with call to copy (#2678) --- util/sync/options.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/util/sync/options.go b/util/sync/options.go index 01dafd4b0a..639411058a 100644 --- a/util/sync/options.go +++ b/util/sync/options.go @@ -23,9 +23,7 @@ type Option func(o *Options) func Stores(stores ...store.Store) Option { return func(o *Options) { o.Stores = make([]store.Store, len(stores)) - for i, s := range stores { - o.Stores[i] = s - } + copy(o.Stores, stores) } }