refactor(http2): replace server Unpin impl with pin_project

This commit is contained in:
Sean McArthur
2019-10-22 18:33:05 -07:00
parent 3ee47199d9
commit 10cda4beff

View File

@@ -17,6 +17,7 @@ use super::{PipeToSendStream, SendBuf};
use crate::{Body, Response};
#[pin_project]
pub(crate) struct Server<T, S, B, E>
where
S: HttpService<Body>,
@@ -27,9 +28,6 @@ where
state: State<T, B>,
}
// TODO: fix me
impl<T, S: HttpService<Body>, B: Payload, E> Unpin for Server<T, S, B, E> {}
enum State<T, B>
where
B: Payload,
@@ -221,8 +219,6 @@ where
impl<F, B> H2Stream<F, B>
where
//F: Future<Item=Response<B>>,
//F::Error: Into<Box<dyn StdError + Send + Sync>>,
B: Payload,
{
fn new(fut: F, respond: SendResponse<SendBuf<B::Data>>) -> H2Stream<F, B> {