mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-25 08:37:29 +01:00
impl IntoResponseParts for ()
(#2471)
This commit is contained in:
parent
7ea7e9f618
commit
85573e0573
3 changed files with 12 additions and 2 deletions
|
@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- None.
|
- **added:** Implement `IntoResponseParts` for `()` ([#2471])
|
||||||
|
|
||||||
|
[#2471]: https://github.com/tokio-rs/axum/pull/2471
|
||||||
|
|
||||||
# 0.4.2 (29. December, 2023)
|
# 0.4.2 (29. December, 2023)
|
||||||
|
|
||||||
|
|
|
@ -258,3 +258,11 @@ impl IntoResponseParts for Extensions {
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoResponseParts for () {
|
||||||
|
type Error = Infallible;
|
||||||
|
|
||||||
|
fn into_response_parts(self, res: ResponseParts) -> Result<ResponseParts, Self::Error> {
|
||||||
|
Ok(res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ error[E0277]: the trait bound `bool: IntoResponse` is not satisfied
|
||||||
axum::extract::rejection::FailedToBufferBody
|
axum::extract::rejection::FailedToBufferBody
|
||||||
axum::extract::rejection::LengthLimitError
|
axum::extract::rejection::LengthLimitError
|
||||||
axum::extract::rejection::UnknownBodyError
|
axum::extract::rejection::UnknownBodyError
|
||||||
axum::extract::rejection::InvalidUtf8
|
bytes::bytes_mut::BytesMut
|
||||||
and $N others
|
and $N others
|
||||||
note: required by a bound in `__axum_macros_check_handler_into_response::{closure#0}::check`
|
note: required by a bound in `__axum_macros_check_handler_into_response::{closure#0}::check`
|
||||||
--> tests/debug_handler/fail/wrong_return_type.rs:4:23
|
--> tests/debug_handler/fail/wrong_return_type.rs:4:23
|
||||||
|
|
Loading…
Reference in a new issue