refactor: use maps.Copy for cleaner map handling
Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
This commit is contained in:
1 parent
5235f3b24f
commit
b7e3c20383
7 files changed
+18
-28
No files matched your search
@@ -2,6 +2,7 @@ package kvdb
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
@@ -77,9 +78,7 @@ func prefetchTest(t *testing.T, db walletdb.DB,
|
||||
}, func() {})
|
||||
require.NoError(t, err)
|
||||
|
||||
for k, v := range put {
|
||||
items[k] = v
|
||||
}
|
||||
maps.Copy(items, put)
|
||||
|
||||
for _, k := range remove {
|
||||
delete(items, k)
|
||||
|
||||
Reference in new issue
Block a user