| ... | @@ -5,7 +5,7 @@ const json = @import("json"); | ... | @@ -5,7 +5,7 @@ const json = @import("json"); |
| 5 | const nfs = @import("nfs"); | 5 | const nfs = @import("nfs"); |
| 6 | | 6 | |
| 7 | pub fn main() !void { | 7 | pub fn main() !void { |
| 8 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | 8 | var gpa = std.heap.DebugAllocator(.{}){}; |
| 9 | const alloc = gpa.allocator(); | 9 | const alloc = gpa.allocator(); |
| 10 | | 10 | |
| 11 | const f = try nfs.cwd().createFile("src/lib.zig", .{}); | 11 | const f = try nfs.cwd().createFile("src/lib.zig", .{}); |
| ... | @@ -71,7 +71,8 @@ pub fn main() !void { | ... | @@ -71,7 +71,8 @@ pub fn main() !void { |
| 71 | } | 71 | } |
| 72 | | 72 | |
| 73 | pub fn simple_fetch(alloc: std.mem.Allocator, url: []const u8) !json.Document { | 73 | pub fn simple_fetch(alloc: std.mem.Allocator, url: []const u8) !json.Document { |
| 74 | var client = std.http.Client{ .allocator = alloc }; | 74 | const io = std.Options.debug_io; |
| | 75 | var client = std.http.Client{ .allocator = alloc, .io = io }; |
| 75 | defer client.deinit(); | 76 | defer client.deinit(); |
| 76 | | 77 | |
| 77 | var list = std.Io.Writer.Allocating.init(alloc); | 78 | var list = std.Io.Writer.Allocating.init(alloc); |