authorgravatar for rabingaire20@gmail.comRabin Gaire <rabingaire20@gmail.com> 2022-04-21 14:12:08+05:45
committergravatar for rabingaire20@gmail.comRabin Gaire <rabingaire20@gmail.com> 2022-04-21 14:12:08+05:45
log50ec55faaf4b218c4ded8a73864bbd0c85571e23
treeae155a41428e1bea1330ac4c8c9f77183ba878f8
parent4ece507b5aa3d89adb3b99258f089aa8f48184b2

ran zig fmt on changes


1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/child_process.zig+3-3
...@@ -658,7 +658,7 @@ pub const ChildProcess = struct {...@@ -658,7 +658,7 @@ pub const ChildProcess = struct {
658 .Pipe => {658 .Pipe => {
659 const idx: usize = if (std_fileno == 0) 0 else 1;659 const idx: usize = if (std_fileno == 0) 0 else 1;
660 try actions.dup2(pipe_fd[idx], std_fileno);660 try actions.dup2(pipe_fd[idx], std_fileno);
661 try actions.close(pipe_fd[1-idx]);661 try actions.close(pipe_fd[1 - idx]);
662 },662 },
663 .Close => try actions.close(std_fileno),663 .Close => try actions.close(std_fileno),
664 .Inherit => {},664 .Inherit => {},
...@@ -1408,7 +1408,7 @@ test "creating a child process with stdin and stdout behavior set to StdIo.Pipe"...@@ -1408,7 +1408,7 @@ test "creating a child process with stdin and stdout behavior set to StdIo.Pipe"
14081408
1409 const out_bytes = try child_process.stdout.?.reader().readAllAlloc(allocator, std.math.maxInt(usize));1409 const out_bytes = try child_process.stdout.?.reader().readAllAlloc(allocator, std.math.maxInt(usize));
1410 defer allocator.free(out_bytes);1410 defer allocator.free(out_bytes);
1411 1411
1412 switch (try child_process.wait()) {1412 switch (try child_process.wait()) {
1413 .Exited => |code| if (code == 0) {1413 .Exited => |code| if (code == 0) {
1414 const expected_program =1414 const expected_program =
...@@ -1420,6 +1420,6 @@ test "creating a child process with stdin and stdout behavior set to StdIo.Pipe"...@@ -1420,6 +1420,6 @@ test "creating a child process with stdin and stdout behavior set to StdIo.Pipe"
1420 ;1420 ;
1421 try testing.expectEqualStrings(expected_program, out_bytes);1421 try testing.expectEqualStrings(expected_program, out_bytes);
1422 },1422 },
1423 else => unreachable1423 else => unreachable,
1424 }1424 }
1425}1425}