Skip to content

Commit

Permalink
Fix expect_read documentation
Browse files Browse the repository at this point in the history
It was copied checked_write but never updated.
  • Loading branch information
Thomasdezeeuw committed Nov 16, 2019
1 parent d8f618e commit ab12e60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ macro_rules! checked_write {
}};
}

/// A checked {write, send, send_to} macro that ensures the entire buffer is
/// written.
/// A checked {read, recv, recv_from, peek, peek_from} macro that ensures the
/// current buffer is read.
///
/// Usage: `expect_read!(stream.read(&mut buf), DATA);` writes into `buf`,
/// comparing to `DATA`.
/// Usage: `expect_read!(stream.read(&mut buf), DATA);` reads into `buf` and
/// compares it to `DATA`.
/// Also works for recv(_from): `expect_read!(socket.recv_from(&mut buf), DATA, address)`.
macro_rules! expect_read {
($socket: ident . $method: ident ( $buf: expr $(, $arg: expr)* ), $expected: expr) => {{
Expand Down

0 comments on commit ab12e60

Please sign in to comment.