Stop implementing IntoFuture for Serve via with_graceful_shutdown

This commit is contained in:
Jonas Platte
2025-04-26 21:30:33 +02:00
parent 7768ee2951
commit 8b968e9b94
+4 -2
View File
@@ -201,8 +201,10 @@ where
type IntoFuture = private::ServeFuture;
fn into_future(self) -> Self::IntoFuture {
self.with_graceful_shutdown(std::future::pending())
.into_future()
private::ServeFuture(Box::pin(async move {
do_serve(self.listener, self.make_service, std::future::pending()).await;
Ok(())
}))
}
}