Skip to content

Commit cbf803c

Browse files
committed
std: Apply fixes for tail drop expressions
1 parent 954a272 commit cbf803c

File tree

1 file changed

+2
-1
lines changed
  • library/std/src/sys/pal/unix/linux/pidfd

1 file changed

+2
-1
lines changed

library/std/src/sys/pal/unix/linux/pidfd/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ fn test_command_pidfd() {
4545
.expect_err("pidfd should not have been created");
4646

4747
// exercise the fork/exec path since the earlier attempts may have used pidfd_spawnp()
48+
let mut cmd = Command::new("false");
4849
let mut child =
49-
unsafe { Command::new("false").pre_exec(|| Ok(())) }.create_pidfd(true).spawn().unwrap();
50+
unsafe { cmd.pre_exec(|| Ok(())) }.create_pidfd(true).spawn().unwrap();
5051

5152
assert!(child.id() > 0 && child.id() < -1i32 as u32);
5253

0 commit comments

Comments
 (0)