mirror of https://github.com/fafhrd91/actix-net
clean up import
This commit is contained in:
parent
350fbd053a
commit
4109f663b1
|
@ -1,7 +1,11 @@
|
||||||
use std::io;
|
use std::{
|
||||||
use std::ops::{Deref, DerefMut};
|
io::{self, IoSlice},
|
||||||
use std::task::{Context, Poll};
|
ops::{Deref, DerefMut},
|
||||||
|
pin::Pin,
|
||||||
|
task::{Context, Poll},
|
||||||
|
};
|
||||||
|
|
||||||
|
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
use actix_rt::net::ActixStream;
|
use actix_rt::net::ActixStream;
|
||||||
use actix_service::{Service, ServiceFactory};
|
use actix_service::{Service, ServiceFactory};
|
||||||
use actix_utils::counter::Counter;
|
use actix_utils::counter::Counter;
|
||||||
|
@ -11,9 +15,6 @@ pub use tokio_native_tls::native_tls::Error;
|
||||||
pub use tokio_native_tls::TlsAcceptor;
|
pub use tokio_native_tls::TlsAcceptor;
|
||||||
|
|
||||||
use super::MAX_CONN_COUNTER;
|
use super::MAX_CONN_COUNTER;
|
||||||
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
|
|
||||||
use std::io::IoSlice;
|
|
||||||
use std::pin::Pin;
|
|
||||||
|
|
||||||
/// wrapper type for `tokio_native_tls::TlsStream` in order to impl `ActixStream` trait.
|
/// wrapper type for `tokio_native_tls::TlsStream` in order to impl `ActixStream` trait.
|
||||||
pub struct TlsStream<T>(tokio_native_tls::TlsStream<T>);
|
pub struct TlsStream<T>(tokio_native_tls::TlsStream<T>);
|
||||||
|
@ -83,7 +84,7 @@ impl<T: ActixStream> ActixStream for TlsStream<T> {
|
||||||
T::poll_read_ready((&**self).get_ref().get_ref().get_ref(), cx)
|
T::poll_read_ready((&**self).get_ref().get_ref().get_ref(), cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> {
|
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||||
T::poll_write_ready((&**self).get_ref().get_ref().get_ref(), cx)
|
T::poll_write_ready((&**self).get_ref().get_ref().get_ref(), cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ impl<T: ActixStream> ActixStream for SslStream<T> {
|
||||||
T::poll_read_ready((&**self).get_ref(), cx)
|
T::poll_read_ready((&**self).get_ref(), cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> {
|
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||||
T::poll_write_ready((&**self).get_ref(), cx)
|
T::poll_write_ready((&**self).get_ref(), cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ impl<T: ActixStream> ActixStream for TlsStream<T> {
|
||||||
T::poll_read_ready((&**self).get_ref().0, cx)
|
T::poll_read_ready((&**self).get_ref().0, cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> {
|
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||||
T::poll_write_ready((&**self).get_ref().0, cx)
|
T::poll_write_ready((&**self).get_ref().0, cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue