From 73a755b2fae4f9c560b1f5cfd331371fdcc151c9 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 31 May 2026 20:48:09 -0700 Subject: [PATCH] update to zig 0.15.2 --- File.zig | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/File.zig b/File.zig index 216ee1e8cd4614783cdd967396d9f1758c9d3ea0..3650459537dedd4c3f7c1fbdd5afaea76354a61c 100644 --- a/File.zig +++ b/File.zig @@ -74,7 +74,7 @@ pub fn getEndPos(self: File) !u64 { } pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize, size_hint: ?usize) ![:0]u8 { - var array_list = try std.ArrayList(u8).initCapacity(allocator, @min(size_hint orelse 1023, max_bytes) + 1); + var array_list = try std.array_list.Managed(u8).initCapacity(allocator, @min(size_hint orelse 1023, max_bytes) + 1); defer array_list.deinit(); self.readAllArrayList(&array_list, max_bytes) catch |err| switch (err) { error.StreamTooLong => return error.FileTooBig, @@ -83,7 +83,7 @@ pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize return try array_list.toOwnedSliceSentinel(0); } -pub fn readAllArrayList(self: File, array_list: *std.ArrayList(u8), max_append_size: usize) anyerror!void { +pub fn readAllArrayList(self: File, array_list: *std.array_list.Managed(u8), max_append_size: usize) anyerror!void { try array_list.ensureTotalCapacity(@min(max_append_size, 4096)); const original_len = array_list.items.len; var start_index: usize = original_len; diff --git a/README.md b/README.md index b35c3aa19ecbf83248577343fd0b22d1081453e4..7b939105ce3ddecc14b2b387d21e3cd354d760e3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![loc](https://sloc.xyz/github/nektro/zig-nfs) [![license](https://img.shields.io/github/license/nektro/zig-nfs.svg)](https://github.com/nektro/zig-nfs/blob/master/LICENSE) [![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro) -[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/) +[![Zig](https://img.shields.io/badge/Zig-0.15-f7a41d)](https://ziglang.org/) [![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod) Nektro's Filesystem, an alternative to `std.fs`. -- 2.54.0