diff --git a/src/client.rs b/src/client.rs index 67a3c41..12dfe9b 100644 --- a/src/client.rs +++ b/src/client.rs @@ -56,7 +56,7 @@ pub fn connect_with_config( Mode::Tls => 443, }); let addrs = (host, port).to_socket_addrs()?; - let mut stream = connect_to_some(addrs.as_slice(), &request.uri())?; + let mut stream = connect_to_some(addrs.as_slice(), request.uri())?; NoDelay::set_nodelay(&mut stream, true)?; #[cfg(not(any(feature = "native-tls", feature = "__rustls-tls")))] diff --git a/src/handshake/server.rs b/src/handshake/server.rs index fddf953..5f86c91 100644 --- a/src/handshake/server.rs +++ b/src/handshake/server.rs @@ -82,7 +82,7 @@ fn create_parts(request: &HttpRequest) -> Result { /// Create a response for the request. pub fn create_response(request: &Request) -> Result { - Ok(create_parts(&request)?.body(())?) + Ok(create_parts(request)?.body(())?) } /// Create a response for the request with a custom body. @@ -90,7 +90,7 @@ pub fn create_response_with_body( request: &HttpRequest, generate_body: impl FnOnce() -> T, ) -> Result> { - Ok(create_parts(&request)?.body(generate_body())?) + Ok(create_parts(request)?.body(generate_body())?) } // Assumes that this is a valid response @@ -263,7 +263,7 @@ impl HandshakeRole for ServerHandshake { let resp = self.error_response.as_ref().unwrap(); let mut output = vec![]; - write_response(&mut output, &resp)?; + write_response(&mut output, resp)?; if let Some(body) = resp.body() { output.extend_from_slice(body.as_bytes());