Skip to content

Commit

Permalink
fix off-by-one error
Browse files Browse the repository at this point in the history
  • Loading branch information
bmusin authored and Bulat Musin committed Jan 13, 2018
1 parent f62f774 commit cee295e
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 @@ -316,8 +316,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 @@ -332,8 +332,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 cee295e

Please sign in to comment.