Skip to content

Commit a2c2413

Browse files
committed
fixes docs for io::buf_read::read_until
1 parent bac74c2 commit a2c2413

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
@@ -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)