chore(all): replace map key deletion loop with clear() (#21082)

This commit is contained in:
Name
2025-04-01 23:28:06 +08:00
committed by GitHub
parent e0c8738230
commit b1bc641105
5 changed files with 6 additions and 18 deletions

View File

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