mirror of
https://github.com/minio/minio.git
synced 2025-01-26 22:23:15 -05:00
fix: specify size in some map allocations (#20764)
This commit is contained in:
parent
54ecce66f0
commit
68b004a48f
@ -256,7 +256,7 @@ func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocke
|
||||
|
||||
// GetDisksID will return disks by their ID.
|
||||
func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI {
|
||||
idMap := make(map[string]struct{})
|
||||
idMap := make(map[string]struct{}, len(ids))
|
||||
for _, id := range ids {
|
||||
idMap[id] = struct{}{}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ const (
|
||||
// getCanonicalHeaders generate a list of request headers with their values
|
||||
func getCanonicalHeaders(signedHeaders http.Header) string {
|
||||
var headers []string
|
||||
vals := make(http.Header)
|
||||
vals := make(http.Header, len(signedHeaders))
|
||||
for k, vv := range signedHeaders {
|
||||
k = strings.ToLower(k)
|
||||
headers = append(headers, k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user