Revert "refactor(lib): Switch from pin-project to pin-project-lite"

This reverts commit 43412a950f.
This commit is contained in:
Sean McArthur
2021-02-05 15:37:21 -08:00
parent 48d4594930
commit 7390f026d7
14 changed files with 262 additions and 343 deletions

View File

@@ -6,7 +6,7 @@ use std::net::{SocketAddr, TcpListener as StdTcpListener};
#[cfg(feature = "tcp")]
use std::time::Duration;
use pin_project_lite::pin_project;
use pin_project::pin_project;
use tokio::io::{AsyncRead, AsyncWrite};
use super::accept::Accept;
@@ -21,17 +21,16 @@ use super::shutdown::{Graceful, GracefulWatcher};
#[cfg(feature = "tcp")]
use super::tcp::AddrIncoming;
pin_project! {
/// A listening HTTP server that accepts connections in both HTTP1 and HTTP2 by default.
///
/// `Server` is a `Future` mapping a bound listener with a set of service
/// handlers. It is built using the [`Builder`](Builder), and the future
/// completes when the server has been shutdown. It should be run by an
/// `Executor`.
pub struct Server<I, S, E = Exec> {
#[pin]
spawn_all: SpawnAll<I, S, E>,
}
/// A listening HTTP server that accepts connections in both HTTP1 and HTTP2 by default.
///
/// `Server` is a `Future` mapping a bound listener with a set of service
/// handlers. It is built using the [`Builder`](Builder), and the future
/// completes when the server has been shutdown. It should be run by an
/// `Executor`.
#[pin_project]
pub struct Server<I, S, E = Exec> {
#[pin]
spawn_all: SpawnAll<I, S, E>,
}
/// A builder for a [`Server`](Server).