mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-28 07:20:12 +01:00
Remove unused nodelay
field in Serve
(#3076)
This commit is contained in:
parent
2ba7c43647
commit
c596deafe4
1 changed files with 1 additions and 9 deletions
|
@ -1,7 +1,6 @@
|
|||
//! Serve services.
|
||||
|
||||
use std::{
|
||||
any::TypeId,
|
||||
convert::Infallible,
|
||||
fmt::Debug,
|
||||
future::{poll_fn, Future, IntoFuture},
|
||||
|
@ -16,7 +15,7 @@ use hyper::body::Incoming;
|
|||
use hyper_util::rt::{TokioExecutor, TokioIo};
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
use hyper_util::{server::conn::auto::Builder, service::TowerToHyperService};
|
||||
use tokio::{net::TcpListener, sync::watch};
|
||||
use tokio::sync::watch;
|
||||
use tower::ServiceExt as _;
|
||||
use tower_service::Service;
|
||||
|
||||
|
@ -99,7 +98,6 @@ where
|
|||
Serve {
|
||||
listener,
|
||||
make_service,
|
||||
tcp_nodelay: None,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +108,6 @@ where
|
|||
pub struct Serve<L, M, S> {
|
||||
listener: L,
|
||||
make_service: M,
|
||||
tcp_nodelay: Option<bool>,
|
||||
_marker: PhantomData<S>,
|
||||
}
|
||||
|
||||
|
@ -168,7 +165,6 @@ where
|
|||
let Self {
|
||||
listener,
|
||||
make_service,
|
||||
tcp_nodelay,
|
||||
_marker: _,
|
||||
} = self;
|
||||
|
||||
|
@ -176,10 +172,6 @@ where
|
|||
s.field("listener", listener)
|
||||
.field("make_service", make_service);
|
||||
|
||||
if TypeId::of::<L>() == TypeId::of::<TcpListener>() {
|
||||
s.field("tcp_nodelay", tcp_nodelay);
|
||||
}
|
||||
|
||||
s.finish()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue