Skip to content

Commit 3c77195

Browse files
committed
Rollup merge of rust-lang#27327 - steveklabnik:fix_take, r=alexcrichton
This only reads five bytes, so don't use a ten byte buffer, that's confusing. r? @alexcrichton
2 parents a368adf + e88ee95 commit 3c77195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ pub trait Read {
707707
///
708708
/// # fn foo() -> io::Result<()> {
709709
/// let mut f = try!(File::open("foo.txt"));
710-
/// let mut buffer = [0; 10];
710+
/// let mut buffer = [0; 5];
711711
///
712712
/// // read at most five bytes
713713
/// let mut handle = f.take(5);

0 commit comments

Comments
 (0)