mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
chore(all): replace map key deletion loop with clear() (#21082)
This commit is contained in:
@@ -132,9 +132,7 @@ func (m *MSS) Msgsize() int {
|
||||
// NewMSS returns a new MSS.
|
||||
func NewMSS() *MSS {
|
||||
m := MSS(mssPool.Get())
|
||||
for k := range m {
|
||||
delete(m, k)
|
||||
}
|
||||
clear(m)
|
||||
return &m
|
||||
}
|
||||
|
||||
|
||||
@@ -87,9 +87,7 @@ func (r *Record) Reset() {
|
||||
if len(r.csvRecord) > 0 {
|
||||
r.csvRecord = r.csvRecord[:0]
|
||||
}
|
||||
for k := range r.nameIndexMap {
|
||||
delete(r.nameIndexMap, k)
|
||||
}
|
||||
clear(r.nameIndexMap)
|
||||
}
|
||||
|
||||
// Clone the record.
|
||||
|
||||
Reference in New Issue
Block a user