Skip to content

Commit f90d942

Browse files
committed
Additional markup tweaks.
1 parent ee62738 commit f90d942

File tree

1 file changed

+6
-4
lines changed
  • examples/std_misc/process/pipe

1 file changed

+6
-4
lines changed

examples/std_misc/process/pipe/pipe.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ fn main() {
1616
};
1717

1818
{
19-
// Write a string to the stdin of `wc`.
20-
// stdin has type `Option<ChildStdin>`, but since we know this instance
19+
// Write a string to the `stdin` of `wc`.
20+
//
21+
// `stdin` has type `Option<ChildStdin>`, but since we know this instance
2122
// must have one, we can directly `unwrap` it.
2223
match process.stdin.unwrap().write_all(PANGRAM.as_bytes()) {
2324
Err(why) => panic!("couldn't write to wc stdin: {}",
2425
Error::description(&why)),
2526
Ok(_) => println!("sent pangram to wc"),
2627
}
2728

28-
// `stdin` gets `drop`ed here, and the pipe is closed
29+
// `stdin` gets `drop`ed here, and the pipe is closed.
30+
//
2931
// This is very important, otherwise `wc` wouldn't start processing the
30-
// input we just sent
32+
// input we just sent.
3133
}
3234

3335
// The `stdout` field also has type `Option<ChildStdout>` so must be unwrapped.

0 commit comments

Comments
 (0)