From 62665d4d10e619f07663edb525ca398903d78756 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 19 Dec 2024 20:35:46 +0000 Subject: [PATCH] range over numEmptyBlocks --- day-09/internal/two/disk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) }