diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:11:03 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:11:03 -0700 |
| commit | ef07e0797f346ead85682a35679a25d3751f526c (patch) | |
| tree | fa4f0b8e3417f685b29ed7e5692514036fc5d94c /src/libstd | |
| parent | b03939bfab90010acdc73e118553e379bac32d1e (diff) | |
| parent | a5e1cbe1915f9fd31900f25f72533fb296ff9a3a (diff) | |
| download | rust-ef07e0797f346ead85682a35679a25d3751f526c.tar.gz rust-ef07e0797f346ead85682a35679a25d3751f526c.zip | |
rollup merge of #23622: steveklabnik/gh23196
Fixes #23196
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 237435d6dfb..39c718c96b3 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -558,6 +558,12 @@ pub trait BufRead: Read { /// This function does not perform any I/O, it simply informs this object /// that some amount of its buffer, returned from `fill_buf`, has been /// consumed and should no longer be returned. + /// + /// This function is used to tell the buffer how many bytes you've consumed + /// from the return value of `fill_buf`, and so may do odd things if + /// `fill_buf` isn't called before calling this. + /// + /// The `amt` must be `<=` the number of bytes in the buffer returned by `fill_buf`. #[stable(feature = "rust1", since = "1.0.0")] fn consume(&mut self, amt: usize); |
