1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 12:45:41 +02:00

Remove usage of upcoming keyword async

AsyncResult::async is replaced with AsyncResult::future
This commit is contained in:
Douman
2018-12-05 03:07:59 -05:00
parent b1635bc0e6
commit 0745a1a9f8
9 changed files with 14 additions and 10 deletions

View File

@@ -250,7 +250,7 @@ pub(crate) enum AsyncResultItem<I, E> {
impl<I, E> AsyncResult<I, E> {
/// Create async response
#[inline]
pub fn async(fut: Box<Future<Item = I, Error = E>>) -> AsyncResult<I, E> {
pub fn future(fut: Box<Future<Item = I, Error = E>>) -> AsyncResult<I, E> {
AsyncResult(Some(AsyncResultItem::Future(fut)))
}
@@ -401,7 +401,7 @@ where
},
Err(e) => err(e),
});
Ok(AsyncResult::async(Box::new(fut)))
Ok(AsyncResult::future(Box::new(fut)))
}
}
@@ -502,7 +502,7 @@ where
Err(e) => Either::A(err(e)),
}
});
AsyncResult::async(Box::new(fut))
AsyncResult::future(Box::new(fut))
}
}