mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-27 00:00:24 +02:00
Add trait IntoResponseHeaders (#649)
* Introduce IntoResponseHeaders trait * Implement IntoResponseHeaders for HeaderMap * Add impl IntoResponse for impl IntoResponseHeaders … and update IntoResponse impls that use HeaderMap to be generic instead. * Add impl IntoResponseHeaders for Headers … and remove IntoResponse impls that use it. * axum-debug: Fix grammar in docs * Explain confusing error message in docs
This commit is contained in:
committed by
David Pedersen
parent
b1ef0be1a7
commit
bf83f34617
@@ -1,9 +1,10 @@
|
||||
error[E0277]: the trait bound `bool: IntoResponse` is not satisfied
|
||||
error[E0277]: the trait bound `bool: axum_core::response::IntoResponseHeaders` is not satisfied
|
||||
--> tests/fail/wrong_return_type.rs:4:23
|
||||
|
|
||||
4 | async fn handler() -> bool {
|
||||
| ^^^^ the trait `IntoResponse` is not implemented for `bool`
|
||||
| ^^^^ the trait `axum_core::response::IntoResponseHeaders` is not implemented for `bool`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `IntoResponse` for `bool`
|
||||
note: required by a bound in `__axum_debug_check_handler_into_response::{closure#0}::check`
|
||||
--> tests/fail/wrong_return_type.rs:4:23
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user