range over numEmptyBlocks

This commit is contained in:
onyx-and-iris 2024-12-19 20:35:46 +00:00
parent abf7abf3ea
commit 62665d4d10

View File

@ -123,7 +123,7 @@ func (d *disk) write() {
allBlocks = append(allBlocks, d.fileblocks...)
for i := 0; i < numEmptyBlocks; i++ {
for i := range numEmptyBlocks {
for !d.emptyblocks[i].IsEmpty() {
allBlocks = append(allBlocks, heap.Pop(&d.emptyblocks[i]).(*block))
}