Zig 0.16: init ArrayList with .empty

This commit is contained in:
LN Liberda 2026-05-22 20:42:30 +02:00
parent dfffa681c1
commit 1d577abefe

View file

@ -150,7 +150,7 @@ fn PatternList(comptime withsub: bool) type {
const e = self.literals.getOrPut(main.allocator, pat) catch unreachable;
if (!e.found_existing) {
e.key_ptr.* = pat;
e.value_ptr.* = if (withsub) .{} else {};
e.value_ptr.* = if (withsub) .empty else {};
}
if (!withsub and !pat.isdir and e.key_ptr.*.isdir) e.key_ptr.* = pat;
if (withsub) {