From 6bcf0066b1a0b972b215f2ebb49c94aaaa3a151a Mon Sep 17 00:00:00 2001 From: meowjesty <43983236+meowjesty@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:18:27 -0300 Subject: [PATCH] Use `.empty` for initialization. Co-authored-by: Rue <78876133+IOKG04@users.noreply.github.com> --- doc/langref/testing_detect_leak.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref/testing_detect_leak.zig b/doc/langref/testing_detect_leak.zig index 5a4e6804bb..f3a3cfb82a 100644 --- a/doc/langref/testing_detect_leak.zig +++ b/doc/langref/testing_detect_leak.zig @@ -2,7 +2,7 @@ const std = @import("std"); test "detect leak" { const allocator = std.testing.allocator; - var list = try std.ArrayList(u21).initCapacity(allocator, 1); + var list: std.ArrayList(u21) = .empty; // missing `defer list.deinit(allocator);` try list.append(allocator, '☔');