We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e3599a + a2c2413 commit 481002eCopy full SHA for 481002e
src/io/buf_read.rs
@@ -54,7 +54,7 @@ pub trait BufRead {
54
///
55
/// let mut file = BufReader::new(File::open("a.txt").await?);
56
57
- /// let mut buf = vec![0; 1024];
+ /// let mut buf = Vec::with_capacity(1024);
58
/// let n = file.read_until(b'\n', &mut buf).await?;
59
/// #
60
/// # Ok(()) }) }
0 commit comments