book icon indicating copy to clipboard operation
book copied to clipboard

Documentation and results do not match

Open Jixiangup opened this issue 5 months ago • 1 comments

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:

  • I have checked the latest main branch to see if this has already been fixed, in this file:

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch17-04-streams.html#streams-futures-in-sequence

Description of the problem: Use the code in the document:

Image

The prompt will report an error, but when I run the same code, it works fine. Please correct it.

Image
  • Rust version info
coloxan@96 example % rustc --version
rustc 1.86.0 (05f9846f8 2025-03-31)
coloxan@96 example % cargo --version
cargo 1.86.0 (adf9b6ad1 2025-02-28)

Suggested fix:

Jixiangup avatar May 16 '25 02:05 Jixiangup