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

Introduce a local IntoHeaderName trait to avoid exposing hyper::header::HeaderName #181

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

lipanski
Copy link
Owner

@lipanski lipanski commented Nov 1, 2023

Related to #179 and the alternative to #180

@lipanski lipanski merged commit 5e57b0d into master Nov 1, 2023
6 checks passed
@lipanski lipanski deleted the into-header-name branch November 1, 2023 19:38
@lipanski lipanski mentioned this pull request Nov 1, 2023
@andrewtoth
Copy link
Contributor

Hmm but this will panic internally if an invalid header name string is provided.

@lipanski
Copy link
Owner Author

lipanski commented Nov 1, 2023

Hmm but this will panic internally if an invalid header name string is provided.

yes and that’s consistent with other methods (like setting the status code to something invalid).

what are you trying to achieve actually or what was the intention behind your initial change?

@andrewtoth
Copy link
Contributor

Fair enough. It is more ergonomic this way and like you said backwards compatible, so no longer a breaking change.

what are you trying to achieve actually or what was the intention behind your initial change?

Initially motivated by this #117. I also ran into the issue of not matching multiple header values individually. By first grouping matchers by header name I think it will be an easier lift to match each header value to a specific header matcher for a given header name. Not sure what your thoughts are on that issue, but maybe we can continue the conversation there?

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.

2 participants