Skip to content

Commit

Permalink
Rollup merge of rust-lang#47330 - bmusin:patch-2, r=shepmaster
Browse files Browse the repository at this point in the history
fix off-by-one error

Fixes rust-lang#47325.
  • Loading branch information
kennytm committed Jan 15, 2018
2 parents 26c1ec3 + cee295e commit 6966f33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ impl<R: Seek> Seek for BufReader<R> {
///
/// let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap();
///
/// for i in 1..10 {
/// stream.write(&[i]).unwrap();
/// for i in 0..10 {
/// stream.write(&[i+1]).unwrap();
/// }
/// ```
///
Expand All @@ -361,8 +361,8 @@ impl<R: Seek> Seek for BufReader<R> {
///
/// let mut stream = BufWriter::new(TcpStream::connect("127.0.0.1:34254").unwrap());
///
/// for i in 1..10 {
/// stream.write(&[i]).unwrap();
/// for i in 0..10 {
/// stream.write(&[i+1]).unwrap();
/// }
/// ```
///
Expand Down

0 comments on commit 6966f33

Please sign in to comment.