From 380e0016cc76b5cc66ba850c51433e65c0bedb7c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jun 2022 14:50:46 +1000 Subject: [PATCH] Use write_all instead of write In this unit test we want to write all the pieces, use `write_all`. Clears clippy warning about not using return value of `write`. --- src/network/stream_reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/stream_reader.rs b/src/network/stream_reader.rs index e3d5b81d..ff2a99c6 100644 --- a/src/network/stream_reader.rs +++ b/src/network/stream_reader.rs @@ -207,7 +207,7 @@ mod test { let mut ostream = ostream.unwrap(); for piece in pieces { - ostream.write(&piece[..]).unwrap(); + ostream.write_all(&piece[..]).unwrap(); ostream.flush().unwrap(); thread::sleep(Duration::from_secs(1)); }