mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
nightly clippy warnings
This commit is contained in:
@ -28,7 +28,7 @@ pub(crate) trait Connect {
|
||||
head: RequestHead,
|
||||
addr: Option<net::SocketAddr>,
|
||||
) -> Box<
|
||||
Future<
|
||||
dyn Future<
|
||||
Item = (ResponseHead, Framed<BoxedSocket, ClientCodec>),
|
||||
Error = SendRequestError,
|
||||
>,
|
||||
@ -69,7 +69,7 @@ where
|
||||
head: RequestHead,
|
||||
addr: Option<net::SocketAddr>,
|
||||
) -> Box<
|
||||
Future<
|
||||
dyn Future<
|
||||
Item = (ResponseHead, Framed<BoxedSocket, ClientCodec>),
|
||||
Error = SendRequestError,
|
||||
>,
|
||||
@ -93,21 +93,21 @@ where
|
||||
}
|
||||
|
||||
trait AsyncSocket {
|
||||
fn as_read(&self) -> &AsyncRead;
|
||||
fn as_read_mut(&mut self) -> &mut AsyncRead;
|
||||
fn as_write(&mut self) -> &mut AsyncWrite;
|
||||
fn as_read(&self) -> &dyn AsyncRead;
|
||||
fn as_read_mut(&mut self) -> &mut dyn AsyncRead;
|
||||
fn as_write(&mut self) -> &mut dyn AsyncWrite;
|
||||
}
|
||||
|
||||
struct Socket<T: AsyncRead + AsyncWrite>(T);
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> AsyncSocket for Socket<T> {
|
||||
fn as_read(&self) -> &AsyncRead {
|
||||
fn as_read(&self) -> &dyn AsyncRead {
|
||||
&self.0
|
||||
}
|
||||
fn as_read_mut(&mut self) -> &mut AsyncRead {
|
||||
fn as_read_mut(&mut self) -> &mut dyn AsyncRead {
|
||||
&mut self.0
|
||||
}
|
||||
fn as_write(&mut self) -> &mut AsyncWrite {
|
||||
fn as_write(&mut self) -> &mut dyn AsyncWrite {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user