From 31229cf7c30150b52b5b921e8e505ad075851d23 Mon Sep 17 00:00:00 2001 From: "Azzam S.A" <17734314+azzamsa@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:05:53 +0700 Subject: [PATCH] docs: add warning icon for extractor order (#2027) --- axum-extra/src/extract/multipart.rs | 2 +- axum/src/extract/multipart.rs | 2 +- axum/src/form.rs | 2 +- axum/src/json.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/axum-extra/src/extract/multipart.rs b/axum-extra/src/extract/multipart.rs index 83c4934fab..5ce730714e 100644 --- a/axum-extra/src/extract/multipart.rs +++ b/axum-extra/src/extract/multipart.rs @@ -23,7 +23,7 @@ use std::{ /// Extractor that parses `multipart/form-data` requests (commonly used with file uploads). /// -/// Since extracting multipart form data from the request requires consuming the body, the +/// ⚠️ Since extracting multipart form data from the request requires consuming the body, the /// `Multipart` extractor must be *last* if there are multiple extractors in a handler. /// See ["the order of extractors"][order-of-extractors] /// diff --git a/axum/src/extract/multipart.rs b/axum/src/extract/multipart.rs index b7f2c10322..3827734f3e 100644 --- a/axum/src/extract/multipart.rs +++ b/axum/src/extract/multipart.rs @@ -22,7 +22,7 @@ use std::{ /// Extractor that parses `multipart/form-data` requests (commonly used with file uploads). /// -/// Since extracting multipart form data from the request requires consuming the body, the +/// ⚠️ Since extracting multipart form data from the request requires consuming the body, the /// `Multipart` extractor must be *last* if there are multiple extractors in a handler. /// See ["the order of extractors"][order-of-extractors] /// diff --git a/axum/src/form.rs b/axum/src/form.rs index 208049130f..c690d48ef3 100644 --- a/axum/src/form.rs +++ b/axum/src/form.rs @@ -17,7 +17,7 @@ use serde::Serialize; /// requests and `application/x-www-form-urlencoded` encoded request bodies for other methods. It /// supports any type that implements [`serde::Deserialize`]. /// -/// Since parsing form data might require consuming the request body, the `Form` extractor must be +/// ⚠️ Since parsing form data might require consuming the request body, the `Form` extractor must be /// *last* if there are multiple extractors in a handler. See ["the order of /// extractors"][order-of-extractors] /// diff --git a/axum/src/json.rs b/axum/src/json.rs index 0f1775c8a9..39fd7f4280 100644 --- a/axum/src/json.rs +++ b/axum/src/json.rs @@ -24,7 +24,7 @@ use serde::{de::DeserializeOwned, Serialize}; /// type. /// - Buffering the request body fails. /// -/// Since parsing JSON requires consuming the request body, the `Json` extractor must be +/// ⚠️ Since parsing JSON requires consuming the request body, the `Json` extractor must be /// *last* if there are multiple extractors in a handler. /// See ["the order of extractors"][order-of-extractors] ///