-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
97 additions
and
154 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
axum-macros/tests/debug_handler/fail/multiple_request_consumers.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
axum-macros/tests/debug_handler/fail/multiple_request_consumers.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: Can't have two extractors that consume the request body. `Json<_>` and `String` both do that. | ||
--> tests/debug_handler/fail/multiple_request_consumers.rs:5:14 | ||
--> tests/debug_handler/fail/multiple_request_consumers.rs:9:14 | ||
| | ||
5 | async fn one(_: Json<()>, _: String, _: Uri) {} | ||
9 | async fn one(_: Json<()>, _: String, _: Uri) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: Can't have more than one extractor that consume the request body. `Json<_>`, `Bytes`, and `String` all do that. | ||
--> tests/debug_handler/fail/multiple_request_consumers.rs:8:14 | ||
| | ||
8 | async fn two(_: Json<()>, _: Method, _: Bytes, _: Uri, _: String) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
--> tests/debug_handler/fail/multiple_request_consumers.rs:12:14 | ||
| | ||
12 | async fn two(_: Json<()>, _: Method, _: Bytes, _: Uri, _: String) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
axum-macros/tests/debug_handler/fail/output_tuple_too_many.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
error: Cannot return tuples with more than 17 elements | ||
--> tests/debug_handler/fail/output_tuple_too_many.rs:5:3 | ||
--> tests/debug_handler/fail/output_tuple_too_many.rs:4:20 | ||
| | ||
5 | ) -> ( | ||
| ___^ | ||
6 | | axum::http::StatusCode, | ||
4 | async fn handler() -> ( | ||
| ____________________^ | ||
5 | | axum::http::StatusCode, | ||
6 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, | ||
7 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, | ||
8 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, | ||
... | | ||
24 | | axum::http::StatusCode, | ||
25 | | ) { | ||
23 | | axum::http::StatusCode, | ||
24 | | ) { | ||
| |_^ |
5 changes: 2 additions & 3 deletions
5
axum-macros/tests/debug_handler/fail/returning_request_parts.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#[axum::debug_handler] | ||
async fn handler( | ||
) -> ( | ||
async fn handler() -> ( | ||
axum::http::request::Parts, // this should be response parts, not request parts | ||
axum::http::StatusCode, | ||
) { | ||
panic!() | ||
} | ||
|
||
fn main(){} | ||
fn main() {} |
4 changes: 2 additions & 2 deletions
4
axum-macros/tests/debug_handler/fail/returning_request_parts.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: `axum::middleware::Next` must the last argument | ||
--> tests/debug_middleware/fail/next_not_last.rs:9:24 | ||
--> tests/debug_middleware/fail/next_not_last.rs:4:24 | ||
| | ||
9 | async fn my_middleware(next: Next, request: Request) -> Response { | ||
4 | async fn my_middleware(next: Next, request: Request) -> Response { | ||
| ^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ enum Extractor { | |
Foo { | ||
#[from_request(via(axum::Extension))] | ||
foo: (), | ||
} | ||
}, | ||
} | ||
|
||
fn main() {} |
2 changes: 1 addition & 1 deletion
2
axum-macros/tests/from_request/fail/state_infer_multiple_different_types.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.