Stop implementing IntoFuture for Serve via with_graceful_shutdown

This commit is contained in:
Jonas Platte 2025-04-26 21:27:18 +02:00
parent 7768ee2951
commit 8b968e9b94
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

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