File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ pub fn main() !void {
77
88 const allocator = arena .allocator ();
99
10+ var threaded : std.Io.Threaded = .init (allocator );
11+ defer threaded .deinit ();
12+ const io = threaded .io ();
13+
1014 const args = try std .process .argsAlloc (allocator );
1115 if (args .len != 4 ) @panic ("Wrong number of arguments" );
1216
@@ -18,15 +22,15 @@ pub fn main() !void {
1822 const patch_file = try std .fs .cwd ().openFile (patch_file_path , .{ .mode = .read_only });
1923 defer patch_file .close ();
2024 var buf : [4096 ]u8 = undefined ;
21- var reader = patch_file .reader (& buf );
25+ var reader = patch_file .reader (io , & buf );
2226 break :patch_file try reader .interface .allocRemaining (allocator , .unlimited );
2327 };
2428 const chunk_details = Chunk .init (allocator , patch_file , 0 ) orelse @panic ("No chunk data found" );
2529
2630 const file = try std .fs .cwd ().openFile (file_path , .{ .mode = .read_only });
2731 defer file .close ();
2832 var in_buf : [4096 ]u8 = undefined ;
29- var reader = file .reader (& in_buf );
33+ var reader = file .reader (io , & in_buf );
3034
3135 const output = try std .fs .cwd ().createFile (output_path , .{});
3236 defer output .close ();
You can’t perform that action at this time.
0 commit comments