1
0
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:
Nikolay Kim
2019-07-17 15:48:37 +06:00
parent 4092c7f326
commit 2a2d7f5768
34 changed files with 104 additions and 99 deletions

View File

@ -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
}
}