use clear()

This commit is contained in:
JackDoan
2026-05-06 15:46:17 -05:00
parent b0f139b578
commit 7924cf0aa8
4 changed files with 8 additions and 24 deletions

View File

@@ -48,9 +48,7 @@ func (p *Passthrough) Flush() error {
firstErr = err
}
}
for i := range p.slots {
p.slots[i] = nil
}
clear(p.slots)
p.slots = p.slots[:0]
p.backing = p.backing[:0]
return firstErr