In
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage by andrewrk · Pull Request #25077 · ziglang/zig · GitHub the interface for readFileAlloc
changed so that allocator
is now second argument instead of first one
- const contents = try std.fs.cwd().readFileAlloc(allocator, file_name, 1234);
+ const contents = try std.fs.cwd().readFileAlloc(file_name, allocator, .limited(1234));
Can somebody please help me understand the reasoning behind this? Also is there a zig convention for passing allocator
at specific argument position?