1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

clippy: spawned process is never 'wait()'ed on

This commit is contained in:
Sylvestre Ledru 2024-11-28 21:27:49 +01:00
parent 41a3695b3f
commit a3a4457a44
2 changed files with 9 additions and 6 deletions

View file

@ -1658,13 +1658,14 @@ fn test_reading_partial_blocks_from_fifo() {
// Start different processes to write to the FIFO, with a small
// pause in between.
let mut writer_command = Command::new("sh");
writer_command
let _ = writer_command
.args([
"-c",
&format!("(printf \"ab\"; sleep 0.1; printf \"cd\") > {fifoname}"),
])
.spawn()
.unwrap();
.unwrap()
.wait();
let output = child.wait_with_output().unwrap();
assert_eq!(output.stdout, b"abcd");
@ -1701,13 +1702,14 @@ fn test_reading_partial_blocks_from_fifo_unbuffered() {
// Start different processes to write to the FIFO, with a small
// pause in between.
let mut writer_command = Command::new("sh");
writer_command
let _ = writer_command
.args([
"-c",
&format!("(printf \"ab\"; sleep 0.1; printf \"cd\") > {fifoname}"),
])
.spawn()
.unwrap();
.unwrap()
.wait();
let output = child.wait_with_output().unwrap();
assert_eq!(output.stdout, b"abcd");