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
-3
@@ -7,6 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -3339,9 +3340,7 @@ func (r *rpcServer) GetInfo(_ context.Context,
|
||||
// Add the features to our map of features, allowing over writing of
|
||||
// existing values because features in different sets with the same bit
|
||||
// are duplicated across sets.
|
||||
for bit, feature := range rpcFeatures {
|
||||
features[bit] = feature
|
||||
}
|
||||
maps.Copy(features, rpcFeatures)
|
||||
}
|
||||
|
||||
// TODO(roasbeef): add synced height n stuff
|
||||
|
||||
Reference in new issue
Block a user