1
0
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:
Rob Ede
2021-11-22 23:11:58 +00:00
parent 07deaadd7b
commit 13f8dcb717
7 changed files with 13 additions and 20 deletions

View File

@ -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(

View File

@ -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()
}
}