authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-31 20:48:09 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-31 20:48:09 -07:00
log73a755b2fae4f9c560b1f5cfd331371fdcc151c9
treeb244fb79ce15e0fcce928dda8333067ea0630820
parent6743e4e3b03cd3e8175a11f328e530edd054f2f1
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.15.2


2 files changed, 3 insertions(+), 3 deletions(-)

File.zig+2-2
......@@ -74,7 +74,7 @@ pub fn getEndPos(self: File) !u64 {
7474}
7575
7676pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize, size_hint: ?usize) ![:0]u8 {
77 var array_list = try std.ArrayList(u8).initCapacity(allocator, @min(size_hint orelse 1023, max_bytes) + 1);
77 var array_list = try std.array_list.Managed(u8).initCapacity(allocator, @min(size_hint orelse 1023, max_bytes) + 1);
7878 defer array_list.deinit();
7979 self.readAllArrayList(&array_list, max_bytes) catch |err| switch (err) {
8080 error.StreamTooLong => return error.FileTooBig,
......@@ -83,7 +83,7 @@ pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize
8383 return try array_list.toOwnedSliceSentinel(0);
8484}
8585
86pub fn readAllArrayList(self: File, array_list: *std.ArrayList(u8), max_append_size: usize) anyerror!void {
86pub fn readAllArrayList(self: File, array_list: *std.array_list.Managed(u8), max_append_size: usize) anyerror!void {
8787 try array_list.ensureTotalCapacity(@min(max_append_size, 4096));
8888 const original_len = array_list.items.len;
8989 var start_index: usize = original_len;
README.md+1-1
......@@ -3,7 +3,7 @@
33![loc](https://sloc.xyz/github/nektro/zig-nfs)
44[![license](https://img.shields.io/github/license/nektro/zig-nfs.svg)](https://github.com/nektro/zig-nfs/blob/master/LICENSE)
55[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)
6[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/)
6[![Zig](https://img.shields.io/badge/Zig-0.15-f7a41d)](https://ziglang.org/)
77[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
99Nektro's Filesystem, an alternative to `std.fs`.