diff --git a/src/lib.zig b/src/lib.zig index 7f26d07d2667c537e0e58619289ae34bd3337f47..6d399e6f0cb46c82a122afd9cd54c764b56acce8 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -450,12 +450,10 @@ pub fn readBytesAlloc(reader: anytype, alloc: std.mem.Allocator, len: usize) ![] } pub fn readFile(dir: std.fs.Dir, sub_path: string, alloc: std.mem.Allocator) !string { - var file = try dir.openFile(sub_path, .{}); - defer file.close(); - const stat = try file.stat(); - var buffer = try std.ArrayList(u8).initCapacity(alloc, stat.size); - pipe(file.reader(), buffer.writer()) catch @panic("unreachable"); // did the filesystem lie? - return buffer.items; + _ = dir; + _ = sub_path; + _ = alloc; + @compileError("use std.fs.Dir.readFileAlloc instead"); } pub fn nullifyS(s: ?string) ?string {