From 6545f72759a8c230c97a48a11dde8d2162a69c86 Mon Sep 17 00:00:00 2001 From: Logan Hodgson <9051940+cellomath@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:14:07 -0800 Subject: [PATCH] Update 01.allocators-gpa.zig Re: https://ziglang.org/documentation/master/std/#src/std/heap/general_purpose_allocator.zig Default initialization of GeneralPurposeAllocator is deprecated; use `.init` instead. --- .../version-0.13/02-standard-library/01.allocators-gpa.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-0.13/02-standard-library/01.allocators-gpa.zig b/website/versioned_docs/version-0.13/02-standard-library/01.allocators-gpa.zig index 5281d61..0d64e3f 100644 --- a/website/versioned_docs/version-0.13/02-standard-library/01.allocators-gpa.zig +++ b/website/versioned_docs/version-0.13/02-standard-library/01.allocators-gpa.zig @@ -4,7 +4,7 @@ const expect = std.testing.expect; // hide-end test "GPA" { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + var gpa = std.heap.GeneralPurposeAllocator(.{}).init; const allocator = gpa.allocator(); defer { const deinit_status = gpa.deinit();