Skip to content

Commit

Permalink
chore: remove unused nodelay field in Serve
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar committed Dec 12, 2024
1 parent 2ba7c43 commit 8dad098
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions axum/src/serve.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Serve services.
use std::{
any::TypeId,
convert::Infallible,
fmt::Debug,
future::{poll_fn, Future, IntoFuture},
Expand All @@ -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;

Expand Down Expand Up @@ -99,7 +98,6 @@ where
Serve {
listener,
make_service,
tcp_nodelay: None,
_marker: PhantomData,
}
}
Expand All @@ -110,7 +108,6 @@ where
pub struct Serve<L, M, S> {
listener: L,
make_service: M,
tcp_nodelay: Option<bool>,
_marker: PhantomData<S>,
}

Expand Down Expand Up @@ -168,18 +165,13 @@ where
let Self {
listener,
make_service,
tcp_nodelay,
_marker: _,
} = self;

let mut s = f.debug_struct("Serve");
s.field("listener", listener)
.field("make_service", make_service);

if TypeId::of::<L>() == TypeId::of::<TcpListener>() {
s.field("tcp_nodelay", tcp_nodelay);
}

s.finish()
}
}
Expand Down

0 comments on commit 8dad098

Please sign in to comment.