Skip to content

Commit bcb4910

Browse files
author
James Munns
authored
Merge pull request #86 from matklad/count-lines-fixed
fix counting lines example
2 parents 0156dc8 + 04cafea commit bcb4910

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)