Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug middleware #2725

Merged
merged 9 commits into from
May 2, 2024
Merged

Debug middleware #2725

merged 9 commits into from
May 2, 2024

Conversation

yanns
Copy link
Contributor

@yanns yanns commented May 2, 2024

Same as #1993, rebased on main

@yanns
Copy link
Contributor Author

yanns commented May 2, 2024

Issue with this PR:

   Doc-tests axum-macros

test axum-macros/src/lib.rs - debug_middleware (line 634) has been running for over 60 seconds

Edit: fixed by 8257e1f, the same way it's done in debug_handler doc.

@yanns yanns marked this pull request as ready for review May 2, 2024 10:24
@yanns yanns mentioned this pull request May 2, 2024
3 tasks
@@ -643,12 +643,14 @@ pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream {
///
/// #[tokio::main]
/// async fn main() {
/// # async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having the main fn do nothing, you can start the code block with ```no_run: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#attributes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 d4c90cb

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your help finishing this!

@jplatte jplatte merged commit df612fd into tokio-rs:main May 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants