Rename box_body to body (#533)

Probably would have been easier to merge this change directly into
`main` first and the backport it to `v0.3.x` but here we are :P

Fixes #528
This commit is contained in:
David Pedersen
2021-11-17 12:59:29 +00:00
committed by GitHub
parent 939995e80e
commit a317072467
16 changed files with 54 additions and 52 deletions
+2 -2
View File
@@ -13,7 +13,7 @@
//! Example is based on <https://github.com/hyperium/hyper/blob/master/examples/http_proxy.rs>
use axum::{
body::{box_body, Body},
body::{boxed, Body},
http::{Method, Request, Response, StatusCode},
routing::get,
Router,
@@ -37,7 +37,7 @@ async fn main() {
let router = router.clone();
async move {
if req.method() == Method::CONNECT {
proxy(req).await.map(|res| res.map(box_body))
proxy(req).await.map(|res| res.map(boxed))
} else {
router.oneshot(req).await.map_err(|err| match err {})
}