mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
refactor: use maps.Copy for cleaner map handling
Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
This commit is contained in:
@@ -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