diff --git a/day-09/internal/two/disk.go b/day-09/internal/two/disk.go index 037b8e1..3611ba9 100644 --- a/day-09/internal/two/disk.go +++ b/day-09/internal/two/disk.go @@ -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)) }