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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user