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