mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-31 11:32:10 +01:00
remove generic E
This commit is contained in:
parent
084a28ca07
commit
a73600fbcd
@ -10,12 +10,12 @@ use tokio_openssl::{ConnectAsync, SslConnectorExt, SslStream};
|
|||||||
use crate::{Address, Connection};
|
use crate::{Address, Connection};
|
||||||
|
|
||||||
/// Openssl connector factory
|
/// Openssl connector factory
|
||||||
pub struct OpensslConnector<T, U, E> {
|
pub struct OpensslConnector<T, U> {
|
||||||
connector: SslConnector,
|
connector: SslConnector,
|
||||||
_t: PhantomData<(T, U, E)>,
|
_t: PhantomData<(T, U)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U, E> OpensslConnector<T, U, E> {
|
impl<T, U> OpensslConnector<T, U> {
|
||||||
pub fn new(connector: SslConnector) -> Self {
|
pub fn new(connector: SslConnector) -> Self {
|
||||||
OpensslConnector {
|
OpensslConnector {
|
||||||
connector,
|
connector,
|
||||||
@ -24,7 +24,7 @@ impl<T, U, E> OpensslConnector<T, U, E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U, E> OpensslConnector<T, U, E>
|
impl<T, U> OpensslConnector<T, U>
|
||||||
where
|
where
|
||||||
T: Address,
|
T: Address,
|
||||||
U: AsyncRead + AsyncWrite + fmt::Debug,
|
U: AsyncRead + AsyncWrite + fmt::Debug,
|
||||||
@ -43,7 +43,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, U, E> Clone for OpensslConnector<T, U, E> {
|
impl<T, U> Clone for OpensslConnector<T, U> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self {
|
Self {
|
||||||
connector: self.connector.clone(),
|
connector: self.connector.clone(),
|
||||||
@ -52,7 +52,7 @@ impl<T, U, E> Clone for OpensslConnector<T, U, E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Address, U, E> NewService<()> for OpensslConnector<T, U, E>
|
impl<T: Address, U> NewService<()> for OpensslConnector<T, U>
|
||||||
where
|
where
|
||||||
U: AsyncRead + AsyncWrite + fmt::Debug,
|
U: AsyncRead + AsyncWrite + fmt::Debug,
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ where
|
|||||||
type Response = Connection<T, SslStream<U>>;
|
type Response = Connection<T, SslStream<U>>;
|
||||||
type Error = HandshakeError<U>;
|
type Error = HandshakeError<U>;
|
||||||
type Service = OpensslConnectorService<T, U>;
|
type Service = OpensslConnectorService<T, U>;
|
||||||
type InitError = E;
|
type InitError = ();
|
||||||
type Future = FutureResult<Self::Service, Self::InitError>;
|
type Future = FutureResult<Self::Service, Self::InitError>;
|
||||||
|
|
||||||
fn new_service(&self, _: &()) -> Self::Future {
|
fn new_service(&self, _: &()) -> Self::Future {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user