Remove unused nodelay field in Serve (#3076)

This commit is contained in:
Shikhar Bhushan 2024-12-12 22:05:41 -05:00 committed by GitHub
parent 2ba7c43647
commit c596deafe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}
}