From 1a1844e9e942758c67f5300f6bb88a510b2e7df8 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Sat, 21 Feb 2026 17:59:51 -0500 Subject: [PATCH] fix(cli): remaining ArrayList API fixes in dataset and queue commands --- cli/src/commands/dataset.zig | 11 ++++++----- cli/src/commands/queue/submit.zig | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cli/src/commands/dataset.zig b/cli/src/commands/dataset.zig index 123e141..431d38e 100644 --- a/cli/src/commands/dataset.zig +++ b/cli/src/commands/dataset.zig @@ -412,11 +412,12 @@ fn verifyDataset(allocator: std.mem.Allocator, target: []const u8, options: *con } // Compute native SHA256 hash - const hash = native_hash.hashDirectory(allocator, path) catch |err| { - colors.printWarning("Hash computation failed: {s}\n", .{@errorName(err)}); - // Continue without hash - verification still succeeded - const hash_str: ?[]const u8 = null; - _ = hash_str; + const hash = blk: { + break :blk native_hash.hashDirectory(allocator, path) catch |err| { + colors.printWarning("Hash computation failed: {s}\n", .{@errorName(err)}); + // Continue without hash - verification still succeeded + break :blk null; + }; }; defer if (hash) |h| allocator.free(h); diff --git a/cli/src/commands/queue/submit.zig b/cli/src/commands/queue/submit.zig index 633e2bd..7dcdd92 100644 --- a/cli/src/commands/queue/submit.zig +++ b/cli/src/commands/queue/submit.zig @@ -34,11 +34,11 @@ pub const SubmitResult = struct { job_count: usize, errors: std.ArrayList([]const u8), - pub fn init(allocator: std.mem.Allocator) SubmitResult { + pub fn init() SubmitResult { return .{ .success = true, .job_count = 0, - .errors = std.ArrayList([]const u8).init(allocator), + .errors = .empty, }; }