From d10bac898c1f9a14be7dff04ff2ea42e004e576e Mon Sep 17 00:00:00 2001 From: Dahuage Date: Wed, 4 Dec 2024 10:44:16 +0800 Subject: [PATCH] fix: fix a garden-path expression that can be confusing. Fix a garden-path expression that can be confusing for those who are familiar with referring to packages using dots, especially when English is a second language for the reader. --- src/ch21-01-single-threaded.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch21-01-single-threaded.md b/src/ch21-01-single-threaded.md index 813a35247..8eb293fa5 100644 --- a/src/ch21-01-single-threaded.md +++ b/src/ch21-01-single-threaded.md @@ -141,7 +141,7 @@ connection, we now call the new `handle_connection` function and pass the `stream` to it. In the `handle_connection` function, we create a new `BufReader` instance that -wraps a reference to the `stream`. `BufReader` adds buffering by managing calls +wraps a reference to the `stream`. And `BufReader` adds buffering by managing calls to the `std::io::Read` trait methods for us. We create a variable named `http_request` to collect the lines of the request