1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

migrate awc and test-server to std::future

This commit is contained in:
Nikolay Kim
2019-11-19 09:55:17 +06:00
parent a6a2d2f444
commit 5ab29b2e62
12 changed files with 376 additions and 397 deletions

View File

@ -253,7 +253,7 @@ where
impl<S, E> From<BodyStream<S, E>> for Body
where
S: Stream<Item = Result<Bytes, E>> + Unpin + 'static,
E: Into<Error> + Unpin + 'static,
E: Into<Error> + 'static,
{
fn from(s: BodyStream<S, E>) -> Body {
Body::from_message(s)
@ -368,10 +368,17 @@ where
}
}
impl<S, E> Unpin for BodyStream<S, E>
where
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error>,
{
}
impl<S, E> MessageBody for BodyStream<S, E>
where
S: Stream<Item = Result<Bytes, E>> + Unpin,
E: Into<Error> + Unpin,
E: Into<Error>,
{
fn size(&self) -> BodySize {
BodySize::Stream