about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.zig8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.zig b/src/main.zig
index 7cc6803..2730187 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -335,9 +335,9 @@ const Builder = struct {
     options: Options,
 
     // track files which affect build output (paths relative to root_dir)
-    parts: std.ArrayList([]const u8),
+    parts: std.ArrayList([]const u8) = .empty,
     // track component digests which should affect digest check
-    dgsts: std.ArrayList(Digest),
+    dgsts: std.ArrayList(Digest) = .empty,
 
     pub const Options = struct {
         // TODO: this is a bit of a hack no?
@@ -356,16 +356,14 @@ const Builder = struct {
             .options = .{
                 .offset_from_siteroot = "/site",
             },
-            .parts = .empty,
-            .dgsts = .empty,
         };
         return b;
     }
 
     fn deinit(self: *Builder, gpa: Allocator) void {
+        self.dgsts.deinit(gpa);
         for (self.parts.items) |p| gpa.free(p);
         self.parts.deinit(gpa);
-        self.dgsts.deinit(gpa);
         gpa.destroy(self);
     }