mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-29 16:19:19 +02:00
clippy fmt
This commit is contained in:
@@ -354,15 +354,16 @@ impl<T, E: Into<Error>> From<Result<T, E>> for AsyncResult<T> {
|
||||
}
|
||||
|
||||
impl<T, E> From<Result<Box<Future<Item = T, Error = E>>, E>> for AsyncResult<T>
|
||||
where T: 'static,
|
||||
E: Into<Error> + 'static
|
||||
where
|
||||
T: 'static,
|
||||
E: Into<Error> + 'static,
|
||||
{
|
||||
#[inline]
|
||||
fn from(res: Result<Box<Future<Item = T, Error = E>>, E>) -> Self {
|
||||
match res {
|
||||
Ok(fut) => AsyncResult(
|
||||
Some(AsyncResultItem::Future(
|
||||
Box::new(fut.map_err(|e| e.into()))))),
|
||||
Ok(fut) => AsyncResult(Some(AsyncResultItem::Future(Box::new(
|
||||
fut.map_err(|e| e.into()),
|
||||
)))),
|
||||
Err(err) => AsyncResult(Some(AsyncResultItem::Err(err.into()))),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user