Skip to content

docs: Small clarification on the usage of read_to_string and read_to_end trait methods - #142102

Merged
bors merged 1 commit into
rust-lang:masterfrom
kiseitai3:141714_stdin_read_to_string_docs
Jun 10, 2025
Merged

bors merged 1 commit into
rust-lang:masterfrom
kiseitai3:141714_stdin_read_to_string_docs

Conversation

@kiseitai3

@kiseitai3 kiseitai3 commented Jun 6, 2025 •

Copy link
Copy Markdown

Small clarification on the usage of read_to_string and read_to_end trait methods. The goal is to make it clear that these trait methods will become locked up if attempting to read to the end of stdin (which is a bit non-sensical unless the other end closes the pipe).

Fixes: #141714

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read from STDIN with read_to_string if reading before piping Rust program writes to STDOUT in another Rust program

7 participants