Skip to content

Commit 04cafea

Browse files
committed
fix counting lines example
1 parent 0156dc8 commit 04cafea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/buf_read.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub trait BufRead {
149149
/// let mut lines = BufReader::new(file).lines();
150150
/// let mut count = 0;
151151
///
152-
/// for line in lines.next().await {
152+
/// while let Some(line) = lines.next().await {
153153
/// line?;
154154
/// count += 1;
155155
/// }

0 commit comments

Comments
 (0)