rust-lang / rust-lang/rust-by-example
Pipes example is a bit misleading w.r.t. wc processing.
Open
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
// Because `stdin` does not live after the above calls, it is `drop`ed,
// and the pipe is closed.
//
// This is very important, otherwise `wc` wouldn't start processing the
// input we just sent.
the second part of the comment is a bit misleading since from the time we start wc, it processes data immediately. We need to close the pipe in order
to actually enforce wc to know its end of its business hence printing the sums to the output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the Pipes example containing the quoted comment and read the surrounding explanation of stdin and wc. Revise the wording so it distinguishes wc processing incoming data from closing the pipe to signal end-of-input, then verify that the example's explanation is accurate and unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100