From c6ebbcf21b49ed8f6920f7eb2d7978301e87bafc Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 1 Apr 2023 05:24:00 +0100 Subject: [PATCH] clippy run on -tls --- actix-server/src/test_server.rs | 2 +- actix-server/tests/server.rs | 2 ++ actix-tls/src/accept/native_tls.rs | 6 +++--- actix-tls/src/accept/openssl.rs | 6 +++--- actix-tls/src/accept/rustls.rs | 6 +++--- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/actix-server/src/test_server.rs b/actix-server/src/test_server.rs index 67659948..828e0216 100644 --- a/actix-server/src/test_server.rs +++ b/actix-server/src/test_server.rs @@ -117,7 +117,7 @@ impl TestServerHandle { /// Stop server. fn stop(&mut self) { - let _ = self.server_handle.stop(false); + drop(self.server_handle.stop(false)); self.thread_handle.take().unwrap().join().unwrap().unwrap(); } diff --git a/actix-server/tests/server.rs b/actix-server/tests/server.rs index dc0c57ca..a46652d1 100644 --- a/actix-server/tests/server.rs +++ b/actix-server/tests/server.rs @@ -1,3 +1,5 @@ +#![allow(clippy::let_underscore_future)] + use std::{ net, sync::{ diff --git a/actix-tls/src/accept/native_tls.rs b/actix-tls/src/accept/native_tls.rs index ce98e687..aad9c4c8 100644 --- a/actix-tls/src/accept/native_tls.rs +++ b/actix-tls/src/accept/native_tls.rs @@ -73,17 +73,17 @@ impl AsyncWrite for TlsStream { } fn is_write_vectored(&self) -> bool { - (&**self).is_write_vectored() + (**self).is_write_vectored() } } impl ActixStream for TlsStream { fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_read_ready((&**self).get_ref().get_ref().get_ref(), cx) + IO::poll_read_ready((**self).get_ref().get_ref().get_ref(), cx) } fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_write_ready((&**self).get_ref().get_ref().get_ref(), cx) + IO::poll_write_ready((**self).get_ref().get_ref().get_ref(), cx) } } diff --git a/actix-tls/src/accept/openssl.rs b/actix-tls/src/accept/openssl.rs index 32973b66..81c207ee 100644 --- a/actix-tls/src/accept/openssl.rs +++ b/actix-tls/src/accept/openssl.rs @@ -76,17 +76,17 @@ impl AsyncWrite for TlsStream { } fn is_write_vectored(&self) -> bool { - (&**self).is_write_vectored() + (**self).is_write_vectored() } } impl ActixStream for TlsStream { fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_read_ready((&**self).get_ref(), cx) + IO::poll_read_ready((**self).get_ref(), cx) } fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_write_ready((&**self).get_ref(), cx) + IO::poll_write_ready((**self).get_ref(), cx) } } diff --git a/actix-tls/src/accept/rustls.rs b/actix-tls/src/accept/rustls.rs index fd0ebfb0..bf324e3c 100644 --- a/actix-tls/src/accept/rustls.rs +++ b/actix-tls/src/accept/rustls.rs @@ -76,17 +76,17 @@ impl AsyncWrite for TlsStream { } fn is_write_vectored(&self) -> bool { - (&**self).is_write_vectored() + (**self).is_write_vectored() } } impl ActixStream for TlsStream { fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_read_ready((&**self).get_ref().0, cx) + IO::poll_read_ready((**self).get_ref().0, cx) } fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { - IO::poll_write_ready((&**self).get_ref().0, cx) + IO::poll_write_ready((**self).get_ref().0, cx) } }