fix(s3): handle empty MetadataMap in dupeImpl correctly

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 <noreply@anthropic.com>
This commit is contained in:
Ciro Spaciari MacBook
2026-01-17 12:46:22 -08:00
parent d45e9a0423
commit ca744fa10e

View File

@@ -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);