update default generic type for ssl filters

This commit is contained in:
Nikolay Kim 2021-12-21 21:20:23 +06:00
parent 52d6c6580e
commit 0b98468c1a
3 changed files with 5 additions and 5 deletions

View file

@ -48,7 +48,7 @@ impl<T: any::Any> QueryItem<T> {
self.item.as_ref().and_then(|v| v.downcast_ref().copied())
}
pub fn get_ref(&self) -> Option<&T> {
pub fn as_ref(&self) -> Option<&T> {
if let Some(ref item) = self.item {
item.downcast_ref()
} else {

View file

@ -6,7 +6,7 @@ use std::{
};
use ntex_bytes::{BufMut, BytesMut, PoolRef};
use ntex_io::{Filter, FilterFactory, Io, IoRef, WriteReadiness};
use ntex_io::{Base, Filter, FilterFactory, Io, IoRef, WriteReadiness};
use ntex_util::{future::poll_fn, ready, time, time::Millis};
use tls_openssl::ssl::{self, SslStream};
@ -16,7 +16,7 @@ pub use self::accept::{Acceptor, AcceptorService};
use super::types;
/// An implementation of SSL streams
pub struct SslFilter<F> {
pub struct SslFilter<F = Base> {
inner: RefCell<SslStream<IoInner<F>>>,
}

View file

@ -4,7 +4,7 @@ use std::sync::Arc;
use std::{any, future::Future, io, pin::Pin, task::Context, task::Poll};
use ntex_bytes::BytesMut;
use ntex_io::{Filter, FilterFactory, Io, IoRef, WriteReadiness};
use ntex_io::{Base, Filter, FilterFactory, Io, IoRef, WriteReadiness};
use ntex_util::time::Millis;
use tls_rust::{ClientConfig, ServerConfig, ServerName};
@ -17,7 +17,7 @@ use self::client::TlsClientFilter;
use self::server::TlsServerFilter;
/// An implementation of SSL streams
pub struct TlsFilter<F> {
pub struct TlsFilter<F = Base> {
inner: InnerTlsFilter<F>,
}