mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
cleanup warnings
This commit is contained in:
parent
fdfadb52e1
commit
f007860a16
@ -1335,4 +1335,9 @@ impl<Io: IoStream> IoStream for TlsStream<Io> {
|
|||||||
fn set_linger(&mut self, dur: Option<time::Duration>) -> io::Result<()> {
|
fn set_linger(&mut self, dur: Option<time::Duration>) -> io::Result<()> {
|
||||||
self.get_mut().get_mut().set_linger(dur)
|
self.get_mut().get_mut().set_linger(dur)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn set_keepalive(&mut self, dur: Option<time::Duration>) -> io::Result<()> {
|
||||||
|
self.get_mut().get_mut().set_keepalive(dur)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ where
|
|||||||
(settings.now(), None)
|
(settings.now(), None)
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut flags = if is_eof {
|
let flags = if is_eof {
|
||||||
Flags::READ_DISCONNECTED
|
Flags::READ_DISCONNECTED
|
||||||
} else if settings.keep_alive_enabled() {
|
} else if settings.keep_alive_enabled() {
|
||||||
Flags::KEEPALIVE | Flags::KEEPALIVE_ENABLED
|
Flags::KEEPALIVE | Flags::KEEPALIVE_ENABLED
|
||||||
@ -664,6 +664,9 @@ mod tests {
|
|||||||
fn set_linger(&mut self, _: Option<time::Duration>) -> io::Result<()> {
|
fn set_linger(&mut self, _: Option<time::Duration>) -> io::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
fn set_keepalive(&mut self, _: Option<time::Duration>) -> io::Result<()> {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
impl io::Write for Buffer {
|
impl io::Write for Buffer {
|
||||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
@ -88,12 +88,15 @@ where
|
|||||||
Ok(Async::Ready(()))
|
Ok(Async::Ready(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call(&mut self, mut req: Self::Request) -> Self::Future {
|
fn call(&mut self, req: Self::Request) -> Self::Future {
|
||||||
HttpChannel::new(self.settings.clone(), req, None)
|
HttpChannel::new(self.settings.clone(), req, None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `NewService` implementation for stream configuration service
|
/// `NewService` implementation for stream configuration service
|
||||||
|
///
|
||||||
|
/// Stream configuration service allows to change some socket level
|
||||||
|
/// parameters. for example `tcp nodelay` or `tcp keep-alive`.
|
||||||
pub struct StreamConfiguration<T, E> {
|
pub struct StreamConfiguration<T, E> {
|
||||||
no_delay: Option<bool>,
|
no_delay: Option<bool>,
|
||||||
tcp_ka: Option<Option<Duration>>,
|
tcp_ka: Option<Option<Duration>>,
|
||||||
@ -141,6 +144,9 @@ impl<T: IoStream, E> NewService for StreamConfiguration<T, E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Stream configuration service
|
/// Stream configuration service
|
||||||
|
///
|
||||||
|
/// Stream configuration service allows to change some socket level
|
||||||
|
/// parameters. for example `tcp nodelay` or `tcp keep-alive`.
|
||||||
pub struct StreamConfigurationService<T, E> {
|
pub struct StreamConfigurationService<T, E> {
|
||||||
no_delay: Option<bool>,
|
no_delay: Option<bool>,
|
||||||
tcp_ka: Option<Option<Duration>>,
|
tcp_ka: Option<Option<Duration>>,
|
||||||
|
@ -23,7 +23,7 @@ impl<T: AsyncRead + AsyncWrite> OpensslAcceptor<T> {
|
|||||||
|
|
||||||
/// Create `OpensslAcceptor` with custom server flags.
|
/// Create `OpensslAcceptor` with custom server flags.
|
||||||
pub fn with_flags(
|
pub fn with_flags(
|
||||||
mut builder: SslAcceptorBuilder, flags: ServerFlags,
|
builder: SslAcceptorBuilder, flags: ServerFlags,
|
||||||
) -> io::Result<ssl::OpensslAcceptor<T>> {
|
) -> io::Result<ssl::OpensslAcceptor<T>> {
|
||||||
let acceptor = openssl_acceptor_with_flags(builder, flags)?;
|
let acceptor = openssl_acceptor_with_flags(builder, flags)?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user