refactor(http2): replace server Unpin impl with pin_project
This commit is contained in:
@@ -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> {
|
||||||
|
|||||||
Reference in New Issue
Block a user