From ab12e606ae65d1f7bfc4b50bdc1b418d82db2564 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Sat, 16 Nov 2019 18:36:20 +0100 Subject: [PATCH] Fix expect_read documentation It was copied checked_write but never updated. --- tests/util/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/util/mod.rs b/tests/util/mod.rs index 986dafb89..be1da9880 100644 --- a/tests/util/mod.rs +++ b/tests/util/mod.rs @@ -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) => {{