fix: specify size in some map allocations (#20764)

This commit is contained in:
Artur Melanchyk
2024-12-13 23:19:12 +01:00
committed by GitHub
parent 54ecce66f0
commit 68b004a48f
2 changed files with 2 additions and 2 deletions

View File

@@ -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{}{}
}