axum: deserialize error path on failure (#3924)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Deserialize without path tracking first, and only if that fails do it again through serde_path_to_error to build the rejection. Error messages and rejection types stay the same, since the second pass sees the same input. This way, the first deserialization doesn't need to allocate path names for potential error reporting, making happy-path faster and deserialization errors twice as slow.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+31 added−13 removed
- other:+31 added−13 removed