mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 10:27:42 +02:00
update to aw beta 9
This commit is contained in:
@ -129,7 +129,7 @@ mod tests {
|
||||
f: F,
|
||||
) -> impl actix_service::Service<
|
||||
actix_http::Request,
|
||||
Response = ServiceResponse<actix_web::body::Body>,
|
||||
Response = ServiceResponse<actix_web::body::AnyBody>,
|
||||
Error = Error,
|
||||
> {
|
||||
test::init_service(
|
||||
|
@ -103,17 +103,17 @@ where
|
||||
|
||||
if let Some(id) = id {
|
||||
match backend.to_response(id.id, id.changed, &mut res).await {
|
||||
Ok(_) => Ok(res.map_body(|_, body| AnyBody::from_message(body))),
|
||||
Ok(_) => Ok(res.map_body(|_, body| AnyBody::new_boxed(body))),
|
||||
Err(e) => Ok(res.error_response(e)),
|
||||
}
|
||||
} else {
|
||||
Ok(res.map_body(|_, body| AnyBody::from_message(body)))
|
||||
Ok(res.map_body(|_, body| AnyBody::new_boxed(body)))
|
||||
}
|
||||
}
|
||||
Err(err) => Ok(req.error_response(err)),
|
||||
}
|
||||
}
|
||||
.map_ok(|res| res.map_body(|_, body| AnyBody::from_message(body)))
|
||||
.map_ok(|res| res.map_body(|_, body| AnyBody::new_boxed(body)))
|
||||
.boxed_local()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user