Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

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)

AltStyle によって変換されたページ (->オリジナル) /