Skip to content

Commit 9079c89

Browse files
pringshiasgeisenh
andauthored
Update src/std_misc/file/read_lines.md
Co-authored-by: Samuel Eisenhandler <[email protected]>
1 parent bde43af commit 9079c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/std_misc/file/read_lines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ and `String::from` respectively.
4141

4242
## A more efficient approach
4343

44-
Here we use the `BufRead` class to read the file. `BufRead` uses an internal
44+
Here we pass ownership of the open `File` to a `BufReader` struct. `BufReader` uses an internal
4545
buffer to reduce intermediate allocations.
4646

4747
We also update `read_lines` to return an iterator instead of allocating new

0 commit comments

Comments
 (0)