Skip to content

Commit

Permalink
Simplify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Mar 7, 2018
1 parent 9483e27 commit c29d772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/io/read_exact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ use io::Read;
/// use nb::io::read_exact;
///
/// let source = [5, 6, 7];
/// let reader = &mut &source[..];
///
/// let mut reading = read_exact(reader, [0, 0]);
/// let mut reading = read_exact(&source[..], [0, 0]);
/// let (_, buffer) = block!(reading.poll()).ok().unwrap();
/// assert_eq!(buffer, [5, 6]);
/// # }
Expand Down
3 changes: 1 addition & 2 deletions src/io/write_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ use io::Write;
///
/// let mut buffer = [0; 3];
/// {
/// let writer = &mut buffer[..];
/// let mut writing = write_all(writer, [5, 6]);
/// let mut writing = write_all(&mut buffer[..], [5, 6]);
/// block!(writing.poll()).ok().unwrap();
/// }
/// assert_eq!(buffer, [5, 6, 0]);
Expand Down

0 comments on commit c29d772

Please sign in to comment.