Skip to content

Commit

Permalink
Update writeFile calls for latest Zig master
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed May 5, 2024
1 parent eb20eee commit 74cb5b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/docgen_old.zig
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ fn genHtml(allocator: mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: anyt
allocator,
&[_][]const u8{ tmp_dir_name, name_plus_ext },
);
try fs.cwd().writeFile(tmp_source_file_name, trimmed_raw_source);
try fs.cwd().writeFile(.{ .sub_path = tmp_source_file_name, .data = trimmed_raw_source });

switch (code.id) {
Code.Id.Exe => |expected_outcome| code_block: {
Expand Down
2 changes: 1 addition & 1 deletion src/doctest/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn runBuild(
&[_][]const u8{ cmd.tmp_dir_name, name_plus_ext },
);

try fs.cwd().writeFile(tmp_source_file_name, input_bytes);
try fs.cwd().writeFile(.{ .sub_path = tmp_source_file_name, .data = input_bytes });

try build_args.appendSlice(&[_][]const u8{
zig_exe, zig_command,
Expand Down
2 changes: 1 addition & 1 deletion src/doctest/test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn runTest(
&[_][]const u8{ cmd.tmp_dir_name, name_plus_ext },
);

try fs.cwd().writeFile(tmp_source_file_name, input_bytes);
try fs.cwd().writeFile(.{ .sub_path = tmp_source_file_name, .data = input_bytes });

var test_args = std.ArrayList([]const u8).init(allocator);
defer test_args.deinit();
Expand Down

0 comments on commit 74cb5b6

Please sign in to comment.