Skip to content

Commit 481002e

Browse files
authored
Merge pull request #152 from montekki/fs-fix-buf-read-docs
fixes docs for io::buf_read::read_until
2 parents 7e3599a + a2c2413 commit 481002e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/buf_read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub trait BufRead {
5454
///
5555
/// let mut file = BufReader::new(File::open("a.txt").await?);
5656
///
57-
/// let mut buf = vec![0; 1024];
57+
/// let mut buf = Vec::with_capacity(1024);
5858
/// let n = file.read_until(b'\n', &mut buf).await?;
5959
/// #
6060
/// # Ok(()) }) }

0 commit comments

Comments
 (0)