-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add back the typed representation of the Link header #113
Open
jplatte
wants to merge
14
commits into
hyperium:master
Choose a base branch
from
jplatte:link-header
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
885aa42
link: move from disabled to common
pietroalbini 722f438
link: publish link as a module instead of re-exporting types
pietroalbini c4de123
link: fix error handling code
pietroalbini fc22f20
link: use ? instead of try!
pietroalbini b976cd7
link: remove missing bench_header
pietroalbini 4fa2b1a
link: depend on language_tags
pietroalbini ba6452a
link: update tests to the new headers API
pietroalbini 218abf3
link: enable and update to the new API a previousy-commented test
pietroalbini f797d3b
links: update logic to the new headers API
pietroalbini 7d621a3
link: wrap enums into structs and expose variants as consts
pietroalbini 369966e
Fix unnecessary trailing semicolon
jplatte 3957921
Address review feedback
jplatte aa6f57b
Use consistent import style
jplatte 91f8bd4
Fix doctest
jplatte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -25,6 +25,7 @@ bytes = "1" | |
mime = "0.3.14" | ||
sha1 = "0.10" | ||
httpdate = "1" | ||
language-tags = "0.3.2" | ||
|
||
[features] | ||
nightly = [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried scrolling through to find the answer, but failed so far. We don't expose this dependency, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are, actually.
LinkValue::href_lang
returnsOption<&[LanguageTag]>
, andLinkValue::push_href_lang
has the parameterlanguage_tag: LanguageTag
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you want that to change before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not expose this dependency publicly, at least that's my default feeling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I feel like it shouldn't be such a big deal for
headers
, as opposed toheaders-core
. But I'll look into how complex it would be to remove it from public API / what the consequences would be exactly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the main reason I would like to not change the code here is that it allows
push_href_lang
to be infallible. Iflanguage-tags
was required to be removed from public API, that would mean parsing the language tag provided by the user in that function. Please let me know whether you agree or not and I'll update the PR accordingly.