From 9699af3649b1645b96acc6147b36069caa67bed6 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 17 Jul 2022 21:25:23 +0900 Subject: [PATCH] Fix clippy::unused_unit warning in examples ``` warning: unneeded unit expression --> examples/hyper-client.rs:139:25 | 139 | () | ^^ help: remove the final `()` | = note: `#[warn(clippy::unused_unit)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit warning: unneeded unit expression --> examples/hyper-client.rs:147:25 | 147 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit warning: unneeded unit expression --> examples/hyper-server.rs:154:29 | 154 | ... () | ^^ help: remove the final `()` | = note: `#[warn(clippy::unused_unit)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit warning: unneeded unit expression --> examples/hyper-server.rs:162:29 | 162 | ... () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit ``` --- examples/hyper-client.rs | 2 -- examples/hyper-server.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/examples/hyper-client.rs b/examples/hyper-client.rs index 9e9949b..63676cf 100644 --- a/examples/hyper-client.rs +++ b/examples/hyper-client.rs @@ -136,7 +136,6 @@ impl tokio::io::AsyncRead for SmolStream { .poll_read(cx, buf.initialize_unfilled()) .map_ok(|size| { buf.advance(size); - () }) } SmolStream::Tls(s) => { @@ -144,7 +143,6 @@ impl tokio::io::AsyncRead for SmolStream { .poll_read(cx, buf.initialize_unfilled()) .map_ok(|size| { buf.advance(size); - () }) } } diff --git a/examples/hyper-server.rs b/examples/hyper-server.rs index 8541941..80eb060 100644 --- a/examples/hyper-server.rs +++ b/examples/hyper-server.rs @@ -151,7 +151,6 @@ impl tokio::io::AsyncRead for SmolStream { .poll_read(cx, buf.initialize_unfilled()) .map_ok(|size| { buf.advance(size); - () }); } SmolStream::Tls(s) => { @@ -159,7 +158,6 @@ impl tokio::io::AsyncRead for SmolStream { .poll_read(cx, buf.initialize_unfilled()) .map_ok(|size| { buf.advance(size); - () }); } SmolStream::Handshake(f) => {