Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@davidpdrsn
Copy link
Member

It generated a function for each extractor to check the type but those
functions didn't have unique names.

Fixed by including all idents in the arg: Extractor token tree in the
name of the function generated. Not sure there is a simpler way to fix
it.

Fixes #551

It generated a function for each extractor to check the type but those
functions didn't have unique names.

Fixed by including all idents in the `arg: Extractor` token tree in the
name of the function generated. Not sure there is a simpler way to fix
it.
@jplatte
Copy link
Member

jplatte commented Nov 22, 2021

Fixed by including all idents in the arg: Extractor token tree in the
name of the function generated. Not sure there is a simpler way to fix
it.

How about a counter? 😄

This would also handle the case of multiple _-ignored extractors that are only there to assert certain things about the request (e.g. auth-related).

@davidpdrsn
Copy link
Member Author

lol omg yes. Welcome to monday morning I guess. My brain was stuck in the "global counter" thing like my earlier PR.

@davidpdrsn davidpdrsn merged commit 27e848f into main Nov 22, 2021
@davidpdrsn davidpdrsn deleted the fix-debug-handler-with-multiple-extractors branch November 22, 2021 09:28
davidpdrsn added a commit that referenced this pull request Nov 22, 2021
- Fix regression causing errors when `#[debug_handler]` was used on functions with multiple
  extractors ([#552])

[#552]: #552
davidpdrsn added a commit that referenced this pull request Nov 22, 2021
- Fix regression causing errors when `#[debug_handler]` was used on functions with multiple
  extractors ([#552])

[#552]: #552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

axum_debug reports error when a handler has multiple extractors.

3 participants