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 {...@@ -74,7 +74,7 @@ pub fn getEndPos(self: File) !u64 {
74}74}
7575
76pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize, size_hint: ?usize) ![:0]u8 {76pub 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);
78 defer array_list.deinit();78 defer array_list.deinit();
79 self.readAllArrayList(&array_list, max_bytes) catch |err| switch (err) {79 self.readAllArrayList(&array_list, max_bytes) catch |err| switch (err) {
80 error.StreamTooLong => return error.FileTooBig,80 error.StreamTooLong => return error.FileTooBig,
...@@ -83,7 +83,7 @@ pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize...@@ -83,7 +83,7 @@ pub fn readToEndAlloc(self: File, allocator: std.mem.Allocator, max_bytes: usize
83 return try array_list.toOwnedSliceSentinel(0);83 return try array_list.toOwnedSliceSentinel(0);
84}84}
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 {
87 try array_list.ensureTotalCapacity(@min(max_append_size, 4096));87 try array_list.ensureTotalCapacity(@min(max_append_size, 4096));
88 const original_len = array_list.items.len;88 const original_len = array_list.items.len;
89 var start_index: usize = original_len;89 var start_index: usize = original_len;
README.md+1-1
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3![loc](https://sloc.xyz/github/nektro/zig-nfs)3![loc](https://sloc.xyz/github/nektro/zig-nfs)
4[![license](https://img.shields.io/github/license/nektro/zig-nfs.svg)](https://github.com/nektro/zig-nfs/blob/master/LICENSE)4[![license](https://img.shields.io/github/license/nektro/zig-nfs.svg)](https://github.com/nektro/zig-nfs/blob/master/LICENSE)
5[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro)5[![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/)
7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)7[![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod)
88
9Nektro's Filesystem, an alternative to `std.fs`.9Nektro's Filesystem, an alternative to `std.fs`.