From 8374c3e789e71b4150fef46e274c9ed1ef9358bf 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 b62eb92337..3340e48b4f 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 9d1518c8e9..9ea91bda82 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 b197e6e27f..7258f60ccd 100644 --- a/axum/src/form.rs +++ b/axum/src/form.rs @@ -16,7 +16,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 a78f064496..74541c1e11 100644 --- a/axum/src/json.rs +++ b/axum/src/json.rs @@ -21,7 +21,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] ///