Rename box_body to boxed (#530)

Fixes #528
This commit is contained in:
David Pedersen
2021-11-17 13:31:10 +01:00
committed by GitHub
parent b9dfea6360
commit cc49fb891f
16 changed files with 61 additions and 50 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 {})
}