From 4cef7492ce5759256e832ba2b61bc67d85e9ce46 Mon Sep 17 00:00:00 2001 From: Alessandro Caprarelli Date: Wed, 13 Oct 2021 17:12:57 +0200 Subject: [PATCH] make clippy more happy --- reqwest-retry/tests/all/helpers/simple_server.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reqwest-retry/tests/all/helpers/simple_server.rs b/reqwest-retry/tests/all/helpers/simple_server.rs index f33d3a2..0fdf5f3 100644 --- a/reqwest-retry/tests/all/helpers/simple_server.rs +++ b/reqwest-retry/tests/all/helpers/simple_server.rs @@ -55,7 +55,7 @@ impl SimpleServer { } /// Starts the TcpListener and handles the requests. - pub async fn start(mut self) -> () { + pub async fn start(mut self) { while let Some(stream) = self.listener.incoming().next().await { match stream { Ok(stream) => { @@ -63,14 +63,12 @@ impl SimpleServer { Ok(_) => (), Err(e) => { println!("Error handling connection: {}", e); - () } } - self.calls_counter = self.calls_counter + 1; + self.calls_counter += 1; } Err(e) => { println!("Connection failed: {}", e); - () } } } @@ -88,7 +86,7 @@ impl SimpleServer { let request = String::from_utf8_lossy(&buffer[..]); let request_line = request.lines().next().unwrap(); - let response = match Self::parse_request_line(&request_line) { + let response = match Self::parse_request_line(request_line) { Ok(request) => { println!("== Request == \n{}\n=============", request); self.get_response().clone()