diff --git a/volo-http/src/server/layer/body_limit.rs b/volo-http/src/server/layer/body_limit.rs index 24c2778e..23381f1e 100644 --- a/volo-http/src/server/layer/body_limit.rs +++ b/volo-http/src/server/layer/body_limit.rs @@ -18,7 +18,6 @@ impl BodyLimitLayer { /// Create a new [`BodyLimitLayer`] with given `body_limit`. /// /// If the Body is larger than the `body_limit`, the request will be rejected. - /// ``` pub fn new(body_limit: usize) -> Self { Self { limit: body_limit } } diff --git a/volo-http/src/server/utils/multipart.rs b/volo-http/src/server/utils/multipart.rs index 47c4091e..f20c9de2 100644 --- a/volo-http/src/server/utils/multipart.rs +++ b/volo-http/src/server/utils/multipart.rs @@ -79,20 +79,22 @@ use crate::{ /// ```rust /// use http::StatusCode; /// use volo_http::{ -/// Router, /// server::{ /// layer::BodyLimitLayer, /// route::post, /// utils::multipart::{Multipart, MultipartRejectionError}, -/// } +/// }, +/// Router, /// }; /// -/// async fn upload_handler(mut multipart: Multipart) -> Result { +/// async fn upload_handler( +/// mut multipart: Multipart, +/// ) -> Result { /// Ok(StatusCode::OK) /// } /// -/// let app: Router<_>= Router::new() -/// .route("/",post(upload_handler)) +/// let app: Router<_> = Router::new() +/// .route("/", post(upload_handler)) /// .layer(BodyLimitLayer::new(1024)); /// ``` #[must_use]