use clear()

This commit is contained in:
JackDoan
2026-05-06 15:46:17 -05:00
parent 0f6f14eaf6
commit a515aeaf39
4 changed files with 8 additions and 24 deletions
+1 -3
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