From ca744fa10e1f948b91fade9b6e1fe07fb8f6df63 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari MacBook Date: Sat, 17 Jan 2026 12:46:22 -0800 Subject: [PATCH] fix(s3): handle empty MetadataMap in dupeImpl correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove incorrect error.OutOfMemory return for empty maps. Zero-length allocations are valid in Zig and the existing code handles them properly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/s3/credentials.zig | 1 - 1 file changed, 1 deletion(-) diff --git a/src/s3/credentials.zig b/src/s3/credentials.zig index cc223e0bfb..468d33e21b 100644 --- a/src/s3/credentials.zig +++ b/src/s3/credentials.zig @@ -82,7 +82,6 @@ pub const MetadataMap = struct { fn dupeImpl(this: @This(), allocator: std.mem.Allocator) error{OutOfMemory}!MetadataMap { const n = this.keys.len; - if (n == 0) return error.OutOfMemory; const new_keys = try allocator.alloc([]const u8, n); errdefer allocator.free(new_keys);