fix: TypedPath conflicts with OptionalFromRequestParts (#3645)

This commit is contained in:
3moredays
2026-02-09 10:09:07 +01:00
committed by GitHub
parent e1dfb330ae
commit c972bcba96
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -9,8 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **breaking:** `#[from_request(via(Extractor))]` now uses the extractor's
rejection type instead of `axum::response::Response` ([#3261])
- **fixed:** Fix compilation error when deriving `TypedPath` with
`OptionalFromRequestParts` being in scope ([#3645])
[#3261]: https://github.com/tokio-rs/axum/pull/3261
[#3645]: https://github.com/tokio-rs/axum/pull/3645
# 0.5.0
+2 -1
View File
@@ -149,7 +149,8 @@ fn expand_named_fields(
parts: &mut ::axum::http::request::Parts,
state: &S,
) -> ::std::result::Result<Self, Self::Rejection> {
::axum::extract::Path::from_request_parts(parts, state)
<::axum::extract::Path<#ident> as ::axum::extract::FromRequestParts<S>>
::from_request_parts(parts, state)
.await
.map(|path| path.0)
#map_err_rejection