cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
506 stars 82 forks source link

The full code is inconsistent with the listings #76

Open seishun opened 1 year ago

seishun commented 1 year ago

URL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch20-03-graceful-shutdown-and-cleanup.html#signaling-to-the-threads-to-stop-listening-for-jobs

Description of the problem:

For instance, the handle_connection function in src/main.rs has let mut buffer = [0; 1024]; as the first line instead of using BufReader.

Suggested fix:

Update the full code to match the listings.